Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

fix: delay checking stale agent version until it's used #1016

Merged
merged 4 commits into from
Apr 13, 2021

Conversation

mdelapenya
Copy link
Contributor

@mdelapenya mdelapenya commented Apr 13, 2021

What does this PR do?

It moves the initialisation of the stale agent version from the setup suite phase (before any scenario) to the only step it's used (deploying an stale agent to Fleet).

Besides that, we detected that the namespace for the custom kibana image was not properly set, so we are making sure the custom version starts with "pr" (it's a PR)
to use the proper Docker namespace.

Finally, we are changing the signature of the method to check if a version is an alias, returning the error so that the caller handles it in whatever manner it needs, instead of handling it in the internal method.

Why is it important?

It will avoid failing all scenarios if the stale agent version is not found. Instead it will fail the step. Therefore setup methods will fail the setup with log.Fatal, and steps will simply return the error, failing that scenario only.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the Unit tests for the CLI, and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

How to test this PR locally

# stale agent, only
SUITE="fleet" TAGS="fleet_mode_agent && nightly" TIMEOUT_FACTOR=3 LOG_LEVEL=TRACE BEATS_USE_CI_SNAPSHOT=false DEVELOPER_MODE=true make -C e2e functional-test
# all suite for centos
SUITE="fleet" TAGS="fleet_mode_agent && centos" TIMEOUT_FACTOR=3 LOG_LEVEL=TRACE BEATS_USE_CI_SNAPSHOT=false DEVELOPER_MODE=true make -C e2e functional-test

Related issues

- in setup methods, we want to fail (log.Fatal)
- in steps, we want to simply return the error to fail the scenario
@mdelapenya mdelapenya self-assigned this Apr 13, 2021
@mdelapenya mdelapenya requested a review from a team April 13, 2021 08:53
@elasticmachine
Copy link
Contributor

elasticmachine commented Apr 13, 2021

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #1016 updated

  • Start Time: 2021-04-13T12:57:08.162+0000

  • Duration: 27 min 5 sec

  • Commit: 0f3b27b

Test stats 🧪

Test Results
Failed 1
Passed 140
Skipped 0
Total 141

Trends 🧪

Image of Build Times

Image of Tests

Test errors 1

Expand to view the tests failures

Initializing / End-To-End Tests / ubuntu-18.04_fleet_agent_endpoint_integration / Deploying an Endpoint makes policies to appear in the Security App – Agent Endpoint Integration
    Expand to view the error details

     Step the policy response will be shown in the Security App: The policy response is not listed as 'success' in the Administration view in the Security App yet 
    

  • no stacktrace

Steps errors 1

Expand to view the steps failures

Run functional tests for fleet:agent_endpoint_integration && ~@nightly && ~debian
  • Took 20 min 22 sec . View more details on here
  • Description: .ci/scripts/functional-test.sh "fleet" "agent_endpoint_integration && ~@nightly && ~debian" "8.0.0-SNAPSHOT" "8.0.0-SNAPSHOT"

Log output

Expand to view the last 100 lines of log output

[2021-04-13T13:23:26.513Z] time="2021-04-13T13:23:25Z" level=info msg="Integration added to the configuration" integration=endpoint integrationConfigurationID=6e39a7fe-45c4-46db-909d-42b8ca17f955 policyID=fb836700-9c58-11eb-b919-57fe61bc9d54 version=0.18.0
[2021-04-13T13:23:26.513Z] time="2021-04-13T13:23:25Z" level=debug msg="Package policy found in the configuration" package="{6e39a7fe-45c4-46db-909d-42b8ca17f955 endpoint Endpoint Security 0.18.0 0xc000429270}" policyID=fb836700-9c58-11eb-b919-57fe61bc9d54
[2021-04-13T13:23:29.104Z] time="2021-04-13T13:23:28Z" level=info msg="Integration deleted from the configuration" integration=endpoint packageConfigId=6e39a7fe-45c4-46db-909d-42b8ca17f955 policyID=fb836700-9c58-11eb-b919-57fe61bc9d54 version=0.18.0
[2021-04-13T13:23:29.105Z] time="2021-04-13T13:23:28Z" level=debug msg="Agent listed in Fleet with online status" agentID=12ddc5b5-a86e-4202-a6cb-241700ead03d hostname=e681b01b7024
[2021-04-13T13:23:29.105Z] time="2021-04-13T13:23:28Z" level=info msg="The Agent is in the desired status" elapsedTime=85.999028ms hostname=e681b01b7024 isAgentInStatus=true retries=1 status=online
[2021-04-13T13:23:29.105Z] time="2021-04-13T13:23:28Z" level=info msg="The Agent is not listed in the Administration view in the Security App" elapsedTime=41.089868ms hostname=e681b01b7024 retries=1
[2021-04-13T13:23:30.060Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:02.275Z","log.origin":{"file.name":"warn/warn.go","file.line":18},"message":"The Elastic Agent is currently in BETA and should not be used in production","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.060Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:02.275Z","log.origin":{"file.name":"application/application.go","file.line":68},"message":"Detecting execution mode","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.060Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:02.276Z","log.origin":{"file.name":"application/application.go","file.line":93},"message":"Agent is managed by Fleet","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.060Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:02.276Z","log.origin":{"file.name":"capabilities/capabilities.go","file.line":59},"message":"capabilities file not found in /opt/Elastic/Agent/capabilities.yml","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.060Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:02.622Z","log.logger":"composable","log.origin":{"file.name":"composable/controller.go","file.line":46},"message":"EXPERIMENTAL - Inputs with variables are currently experimental and should not be used in production","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.060Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:02.725Z","log.logger":"composable.providers.docker","log.origin":{"file.name":"docker/docker.go","file.line":43},"message":"Docker provider skipped, unable to connect: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:02.726Z","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":62},"message":"Starting stats endpoint","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:02.726Z","log.origin":{"file.name":"application/managed_mode.go","file.line":289},"message":"Agent is starting","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:02.726Z","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":64},"message":"Metrics endpoint listening on: /opt/Elastic/Agent/data/tmp/elastic-agent.sock (configured: unix:///opt/Elastic/Agent/data/tmp/elastic-agent.sock)","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"warn","@timestamp":"2021-04-13T13:23:02.827Z","log.origin":{"file.name":"application/managed_mode.go","file.line":302},"message":"failed to ack update open /opt/Elastic/Agent/data/.update-marker: no such file or directory","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:04.627Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":48},"message":"New State ID is MHVV7vTN","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:04.627Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":49},"message":"Converging state requires execution of 3 step(s)","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:04.627Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"filebeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:04.627Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"filebeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:09.739Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-04-13T13:23:09Z: type: 'STATE': sub_type: 'STARTING' message: Application: filebeat--8.0.0-SNAPSHOT[12ddc5b5-a86e-4202-a6cb-241700ead03d]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:09.740Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"metricbeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.061Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:09.741Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"metricbeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:10.950Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-04-13T13:23:10Z: type: 'STATE': sub_type: 'RUNNING' message: Application: filebeat--8.0.0-SNAPSHOT[12ddc5b5-a86e-4202-a6cb-241700ead03d]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:13.374Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-04-13T13:23:13Z: type: 'STATE': sub_type: 'STARTING' message: Application: metricbeat--8.0.0-SNAPSHOT[12ddc5b5-a86e-4202-a6cb-241700ead03d]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:13.378Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"filebeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:13.378Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"filebeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:13.585Z","log.origin":{"file.name":"operation/operator.go","file.line":259},"message":"operation 'operation-install' skipped for filebeat.8.0.0-SNAPSHOT","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:13.767Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-04-13T13:23:13Z: type: 'STATE': sub_type: 'STARTING' message: Application: filebeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[12ddc5b5-a86e-4202-a6cb-241700ead03d]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:13.768Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"metricbeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:13.768Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"metricbeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:13.998Z","log.origin":{"file.name":"operation/operator.go","file.line":259},"message":"operation 'operation-install' skipped for metricbeat.8.0.0-SNAPSHOT","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:14.342Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-04-13T13:23:14Z: type: 'STATE': sub_type: 'STARTING' message: Application: metricbeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[12ddc5b5-a86e-4202-a6cb-241700ead03d]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.062Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:14.344Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":66},"message":"Updating internal state","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.063Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:14.634Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-04-13T13:23:14Z: type: 'STATE': sub_type: 'RUNNING' message: Application: metricbeat--8.0.0-SNAPSHOT[12ddc5b5-a86e-4202-a6cb-241700ead03d]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.063Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:14.937Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-04-13T13:23:14Z: type: 'STATE': sub_type: 'RUNNING' message: Application: filebeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[12ddc5b5-a86e-4202-a6cb-241700ead03d]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.063Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:15.642Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-04-13T13:23:15Z: type: 'STATE': sub_type: 'RUNNING' message: Application: metricbeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[12ddc5b5-a86e-4202-a6cb-241700ead03d]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.063Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:26.812Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":48},"message":"New State ID is bWAyAxgx","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.063Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:26.812Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":49},"message":"Converging state requires execution of 3 step(s)","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.063Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:26.812Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"endpoint-security.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/endpoint-security-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.063Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:26.813Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"endpoint-security.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/endpoint-security-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.063Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:27.596Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-04-13T13:23:27Z: type: 'STATE': sub_type: 'STARTING' message: Application: endpoint-security--8.0.0-SNAPSHOT[12ddc5b5-a86e-4202-a6cb-241700ead03d]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.063Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:27.913Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"filebeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.063Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:27.913Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"filebeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.064Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.104Z","log.origin":{"file.name":"operation/operator.go","file.line":259},"message":"operation 'operation-install' skipped for filebeat.8.0.0-SNAPSHOT","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.064Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.104Z","log.origin":{"file.name":"operation/operator.go","file.line":259},"message":"operation 'operation-start' skipped for filebeat.8.0.0-SNAPSHOT","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.064Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.105Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"filebeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.064Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.105Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"filebeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.064Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.295Z","log.origin":{"file.name":"operation/operator.go","file.line":259},"message":"operation 'operation-install' skipped for filebeat.8.0.0-SNAPSHOT","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.064Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.295Z","log.origin":{"file.name":"operation/operator.go","file.line":259},"message":"operation 'operation-start' skipped for filebeat.8.0.0-SNAPSHOT","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.064Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.295Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"metricbeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.064Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.295Z","log.origin":{"file.name":"operation/operation_fetch.go","file.line":61},"message":"metricbeat.8.0.0-SNAPSHOT already exists in /opt/Elastic/Agent/data/elastic-agent-53d75c/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.064Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.515Z","log.origin":{"file.name":"operation/operator.go","file.line":259},"message":"operation 'operation-install' skipped for metricbeat.8.0.0-SNAPSHOT","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.064Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.515Z","log.origin":{"file.name":"operation/operator.go","file.line":259},"message":"operation 'operation-start' skipped for metricbeat.8.0.0-SNAPSHOT","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.065Z] {"log.level":"info","@timestamp":"2021-04-13T13:23:28.516Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":66},"message":"Updating internal state","ecs.version":"1.6.0"}
[2021-04-13T13:23:30.065Z] time="2021-04-13T13:23:29Z" level=debug msg="Docker compose executed." cmd="[exec -T centos-systemd cat /opt/Elastic/Agent/data/elastic-agent-53d75c/logs//elastic-agent-json.log]" composeFilePaths="[/var/lib/jenkins/workspace/PR-1016-2-1dee86aa-6aa4-4c3d-8116-2c83a141cb6e/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/PR-1016-2-1dee86aa-6aa4-4c3d-8116-2c83a141cb6e/.op/compose/services/centos-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz433992047 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz centos_systemdContainerName:fleet_centos-systemd_elastic-agent_1 centos_systemdTag:latest kibanaDockerNamespace:kibana kibanaVersion:8.0.0-SNAPSHOT stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-04-13T13:23:40.247Z] {"level":"debug","time":"2021-04-13T13:23:38Z","message":"gathering metrics"}
[2021-04-13T13:23:43.667Z] Elastic Agent has been uninstalled.
[2021-04-13T13:23:43.667Z] time="2021-04-13T13:23:43Z" level=debug msg="Docker compose executed." cmd="[exec -T centos-systemd elastic-agent uninstall -f]" composeFilePaths="[/var/lib/jenkins/workspace/PR-1016-2-1dee86aa-6aa4-4c3d-8116-2c83a141cb6e/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/PR-1016-2-1dee86aa-6aa4-4c3d-8116-2c83a141cb6e/.op/compose/services/centos-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz433992047 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz centos_systemdContainerName:fleet_centos-systemd_elastic-agent_1 centos_systemdTag:latest kibanaDockerNamespace:kibana kibanaVersion:8.0.0-SNAPSHOT stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-04-13T13:23:43.668Z] time="2021-04-13T13:23:43Z" level=debug msg="Un-enrolling agent in Fleet" agentID=12ddc5b5-a86e-4202-a6cb-241700ead03d hostname=e681b01b7024
[2021-04-13T13:23:44.621Z] time="2021-04-13T13:23:44Z" level=debug msg="Fleet agent was unenrolled" agentID=12ddc5b5-a86e-4202-a6cb-241700ead03d
[2021-04-13T13:23:45.569Z] Stopping fleet_centos-systemd_elastic-agent_1 ... 
[2021-04-13T13:23:49.833Z] {"level":"debug","time":"2021-04-13T13:23:49Z","message":"sent request with 0 transactions, 0 spans, 0 errors, 1 metricset"}
[2021-04-13T13:23:56.670Z] 
Stopping fleet_centos-systemd_elastic-agent_1 ... done
Removing fleet_centos-systemd_elastic-agent_1 ... 
[2021-04-13T13:23:56.670Z] 
Removing fleet_centos-systemd_elastic-agent_1 ... done
Going to remove fleet_centos-systemd_elastic-agent_1
[2021-04-13T13:23:56.934Z] time="2021-04-13T13:23:56Z" level=debug msg="Docker compose executed." cmd="[rm -fvs centos-systemd]" composeFilePaths="[/var/lib/jenkins/workspace/PR-1016-2-1dee86aa-6aa4-4c3d-8116-2c83a141cb6e/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/PR-1016-2-1dee86aa-6aa4-4c3d-8116-2c83a141cb6e/.op/compose/services/centos-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz433992047 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz centos_systemdContainerName:fleet_centos-systemd_elastic-agent_1 centos_systemdTag:latest kibanaDockerNamespace:kibana kibanaVersion:8.0.0-SNAPSHOT stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-04-13T13:23:56.934Z] time="2021-04-13T13:23:56Z" level=debug msg="Service removed from compose" profile=fleet service=centos-systemd
[2021-04-13T13:23:57.889Z] time="2021-04-13T13:23:57Z" level=debug msg="The token was deleted" tokenID=9aae6851-29ab-4a37-88d8-f2cb4e8db883
[2021-04-13T13:23:57.889Z] time="2021-04-13T13:23:57Z" level=info msg="Integration deleted from the configuration" integration=endpoint packageConfigId=6e39a7fe-45c4-46db-909d-42b8ca17f955 policyID=fb836700-9c58-11eb-b919-57fe61bc9d54 version=0.18.0
[2021-04-13T13:23:57.890Z] time="2021-04-13T13:23:57Z" level=debug msg="Destroying Fleet runtime dependencies"
[2021-04-13T13:23:58.470Z] Stopping fleet_kibana_1           ... 
[2021-04-13T13:23:58.470Z] Stopping fleet_package-registry_1 ... 
[2021-04-13T13:23:58.470Z] Stopping fleet_elasticsearch_1    ... 
[2021-04-13T13:24:00.284Z] 
Stopping fleet_kibana_1           ... done

Stopping fleet_package-registry_1 ... done

Stopping fleet_elasticsearch_1    ... done
Removing fleet_kibana_1           ... 
[2021-04-13T13:24:00.284Z] Removing fleet_package-registry_1 ... 
[2021-04-13T13:24:00.284Z] Removing fleet_elasticsearch_1    ... 
[2021-04-13T13:24:00.546Z] 
Removing fleet_kibana_1           ... done

Removing fleet_package-registry_1 ... done

Removing fleet_elasticsearch_1    ... done
Removing network fleet_default
[2021-04-13T13:24:00.811Z] time="2021-04-13T13:24:00Z" level=debug msg="Docker compose executed." cmd="[down --remove-orphans]" composeFilePaths="[/var/lib/jenkins/workspace/PR-1016-2-1dee86aa-6aa4-4c3d-8116-2c83a141cb6e/.op/compose/profiles/fleet/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz433992047 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz centos_systemdContainerName:fleet_centos-systemd_elastic-agent_1 centos_systemdTag:latest kibanaDockerNamespace:kibana kibanaVersion:8.0.0-SNAPSHOT stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-04-13T13:24:00.812Z] time="2021-04-13T13:24:00Z" level=debug msg="Elastic Agent binary was removed." installer=centos-tar-8.0.0-SNAPSHOT path=/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz433992047
[2021-04-13T13:24:00.812Z] Makefile:73: recipe for target 'functional-test' failed
[2021-04-13T13:24:00.812Z] make: *** [functional-test] Error 1
[2021-04-13T13:24:00.981Z] [INFO] Stopping Filebeat Docker container
[2021-04-13T13:24:01.319Z] + docker exec -t 347e39fb1846d8a654a42ff9b6d3495af2dd4f78d70132f24ba7927a53af5d91 chmod -R ugo+rw /output
[2021-04-13T13:24:01.583Z] + docker stop --time 30 347e39fb1846d8a654a42ff9b6d3495af2dd4f78d70132f24ba7927a53af5d91
[2021-04-13T13:24:01.860Z] 347e39fb1846d8a654a42ff9b6d3495af2dd4f78d70132f24ba7927a53af5d91
[2021-04-13T13:24:01.887Z] Archiving artifacts
[2021-04-13T13:24:02.616Z] Recording test results
[2021-04-13T13:24:03.064Z] [Checks API] No suitable checks publisher found.
[2021-04-13T13:24:03.117Z] Archiving artifacts
[2021-04-13T13:24:03.175Z] Running in /var/lib/jenkins/workspace/PR-1016-2-1dee86aa-6aa4-4c3d-8116-2c83a141cb6e/src/github.com/elastic/e2e-testing
[2021-04-13T13:24:03.494Z] + go clean -modcache
[2021-04-13T13:24:04.304Z] Failed in branch ubuntu-18.04_fleet_agent_endpoint_integration
[2021-04-13T13:24:05.454Z] Stage "Release" skipped due to earlier failure(s)
[2021-04-13T13:24:12.695Z] Running on Jenkins in /var/lib/jenkins/workspace/2e-tests_e2e-testing-mbp_PR-1016
[2021-04-13T13:24:12.775Z] [INFO] getVaultSecret: Getting secrets
[2021-04-13T13:24:12.940Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-04-13T13:24:13.740Z] + chmod 755 generate-build-data.sh
[2021-04-13T13:24:13.740Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1016/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1016/runs/2 FAILURE 1625307
[2021-04-13T13:24:13.990Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1016/runs/2/steps/?limit=10000 -o steps-info.json
[2021-04-13T13:24:15.334Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-1016/runs/2/tests/?status=FAILED -o tests-errors.json

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Test stats 🧪

Test Results
Failed 1
Passed 140
Skipped 0
Total 141

Genuine test errors 1

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Initializing / End-To-End Tests / ubuntu-18.04_fleet_agent_endpoint_integration / Deploying an Endpoint makes policies to appear in the Security App – Agent Endpoint Integration

@mdelapenya mdelapenya marked this pull request as ready for review April 13, 2021 10:58
@mdelapenya mdelapenya merged commit 00a568d into elastic:master Apr 13, 2021
mergify bot pushed a commit that referenced this pull request Apr 13, 2021
* fix: delay checking stale agent version until it's used

* fix: use proper kibana version

* chore: handle errors in the caller when the version is not found

- in setup methods, we want to fail (log.Fatal)
- in steps, we want to simply return the error to fail the scenario

(cherry picked from commit 00a568d)

# Conflicts:
#	e2e/_suites/fleet/ingest_manager_test.go
mergify bot pushed a commit that referenced this pull request Apr 13, 2021
* fix: delay checking stale agent version until it's used

* fix: use proper kibana version

* chore: handle errors in the caller when the version is not found

- in setup methods, we want to fail (log.Fatal)
- in steps, we want to simply return the error to fail the scenario

(cherry picked from commit 00a568d)
mergify bot pushed a commit that referenced this pull request Apr 13, 2021
* fix: delay checking stale agent version until it's used

* fix: use proper kibana version

* chore: handle errors in the caller when the version is not found

- in setup methods, we want to fail (log.Fatal)
- in steps, we want to simply return the error to fail the scenario

(cherry picked from commit 00a568d)
mdelapenya added a commit that referenced this pull request Apr 13, 2021
…) (#1023)

* fix: delay checking stale agent version until it's used (#1016)

* fix: delay checking stale agent version until it's used

* fix: use proper kibana version

* chore: handle errors in the caller when the version is not found

- in setup methods, we want to fail (log.Fatal)
- in steps, we want to simply return the error to fail the scenario

(cherry picked from commit 00a568d)

# Conflicts:
#	e2e/_suites/fleet/ingest_manager_test.go

* fix: resolve conflicts

Co-authored-by: Manuel de la Peña <[email protected]>
mdelapenya added a commit that referenced this pull request Apr 13, 2021
* fix: delay checking stale agent version until it's used

* fix: use proper kibana version

* chore: handle errors in the caller when the version is not found

- in setup methods, we want to fail (log.Fatal)
- in steps, we want to simply return the error to fail the scenario

(cherry picked from commit 00a568d)

Co-authored-by: Manuel de la Peña <[email protected]>
mdelapenya added a commit that referenced this pull request Apr 13, 2021
* fix: delay checking stale agent version until it's used

* fix: use proper kibana version

* chore: handle errors in the caller when the version is not found

- in setup methods, we want to fail (log.Fatal)
- in steps, we want to simply return the error to fail the scenario

(cherry picked from commit 00a568d)

Co-authored-by: Manuel de la Peña <[email protected]>
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 15, 2021
* master:
  chore: add debug info for the payload (elastic#1044)
  chore: add debug traces for the webhook payload (elastic#1043)
  fix: wrong interpolation (elastic#1042)
  Update Elastic Agent to not use Kibana (elastic#1036)
  fix: apply X version for non-master branches (elastic#1037)
  fix: add NodeJS to PATH (elastic#1035)
  fix: use an agent when building kibana (elastic#1030)
  fix(jjb): use a branch that exists (elastic#1029)
  remove uninstall step (elastic#1017)
  fix: delay checking stale agent version until it's used (elastic#1016)
  fix: use same JJB than in custom kibana (elastic#1010)
  chore: simplify PR template (elastic#1011)
  feat: support passing KIBANA_VERSION (elastic#905)
  [mergify] assign the original author (elastic#1009)
  Remove the agent config file parameters for stand alone (elastic#983)
  Uniquify the stand-alone step for checking agent status (elastic#993)
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 19, 2021
* master:
  fix: check if kibana version is a commit (elastic#1047)
  fix: incorrect variable name (elastic#1046)
  fix: typo in parameters (elastic#1045)
  chore: add debug info for the payload (elastic#1044)
  chore: add debug traces for the webhook payload (elastic#1043)
  fix: wrong interpolation (elastic#1042)
  Update Elastic Agent to not use Kibana (elastic#1036)
  fix: apply X version for non-master branches (elastic#1037)
  fix: add NodeJS to PATH (elastic#1035)
  fix: use an agent when building kibana (elastic#1030)
  fix(jjb): use a branch that exists (elastic#1029)
  remove uninstall step (elastic#1017)
  fix: delay checking stale agent version until it's used (elastic#1016)
  fix: use same JJB than in custom kibana (elastic#1010)
  chore: simplify PR template (elastic#1011)
  feat: support passing KIBANA_VERSION (elastic#905)
  [mergify] assign the original author (elastic#1009)
@mdelapenya mdelapenya deleted the delay-check-stale-version branch April 30, 2021 09:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not fail the entire suite when the stale agent test cannot find the stale agent version
3 participants