You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a test scenario querying the elastic agent's log index in ES (logs-elastic.agent-default) which is randomly failing because the index is not found.
The test scenario (BDD)
@deploy-stand-aloneScenario Outline: Deploying a <image> stand-alone agentWhen a "<image>" stand-alone agent is deployed
Then there is new data in the index from agent
Examples:
| image || default || ubi8 |
This scenario starts a docker compose file with Elasticsearch, Kibana and the Package Registry, and adds to the compose file a docker container with the Elastic Agent image (When), for the default and the UBI8 flavours (so the tests are exactly the same but changing which docker image is used to spin up the service). Finally, it queries ES using the official Go client (Then) with the following query (in Golang), which we see retrieving documents in a non deterministic manner:
The ES client returns a 404 error wit the following message:
[2020-09-24T05:51:50.616Z] time="2020-09-24T05:51:50Z" level=warning msg="There was an error executing the query" desiredHits=50 elapsedTime=26.350829ms error="Error getting response from Elasticsearch. Status: 404 Not Found, ResponseError: map[error:map[index:logs-elastic.agent-default index_uuid:na reason:no such index [logs-elastic.agent-default] resource.id:logs-elastic.agent-default resource.type:index_or_alias root_cause:[map[index:logs-elastic.agent-default index_uuid:na reason:no such index [logs-elastic.agent-default] resource.id:logs-elastic.agent-default resource.type:index_or_alias type:index_not_found_exception]] type:index_not_found_exception] status:404]" index=logs-elastic.agent-default retry=1
It's important to note that his query is executed in a backoff strategy for a maxTimeout = 3 minutes before failing, so we do not think it's a problem of the tests being too fast.
How to test this
Install requirements: docker + docker-compose
Clone the e2e repo: git clone https://github.com/elastic/e2e-testing
Run the stand-alone tests
$ cd e2e-testing
$ SUITE=ingest-manager DEVELOPER_MODE=true FEATURE="stand_alone_mode" LOG_LEVEL=TRACE make -C e2e functional-test
Logs
Jenkins Logs and Tests
We always output the log of the elastic-agent container at the end of the scenario, so there you'll find any other information.
Jenkins job finding the index (some of them)
320.log Ubi8 passing but not for the default Agent image:
Inspecting the logs i see two reasons of failure.
First one is text file busy issue #21120
Second one is ASC hash mismatch, i will take a look to see what can i do to improve experience here, this was due to missing ASC in the release bits which should be fixed.
The problem there is that it compares asc of released build metricbeat vs self beat metricbeat which is packed (because second iteration of release was not finished).
We have a test scenario querying the elastic agent's log index in ES (
logs-elastic.agent-default
) which is randomly failing because the index is not found.The test scenario (BDD)
This scenario starts a docker compose file with Elasticsearch, Kibana and the Package Registry, and adds to the compose file a docker container with the Elastic Agent image (
When
), for the default and the UBI8 flavours (so the tests are exactly the same but changing which docker image is used to spin up the service). Finally, it queries ES using the official Go client (Then
) with the following query (in Golang), which we see retrieving documents in a non deterministic manner:The ES client returns a 404 error wit the following message:
It's important to note that his query is executed in a backoff strategy for a maxTimeout = 3 minutes before failing, so we do not think it's a problem of the tests being too fast.
How to test this
git clone https://github.com/elastic/e2e-testing
Logs
Jenkins Logs and Tests
We always output the log of the elastic-agent container at the end of the scenario, so there you'll find any other information.
Jenkins job finding the index (some of them)
Jenkins job not finding the index
cc/ @ph @EricDavisX
The text was updated successfully, but these errors were encountered: