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

Add a standalone test scenario for fleet server mode#978

Merged
adam-stokes merged 1 commit intoelastic:masterfrom
jalvz:fleet-server-standalone
Mar 31, 2021
Merged

Add a standalone test scenario for fleet server mode#978
adam-stokes merged 1 commit intoelastic:masterfrom
jalvz:fleet-server-standalone

Conversation

@jalvz
Copy link
Copy Markdown
Contributor

@jalvz jalvz commented Mar 31, 2021

What does this PR do?

Starts Elastic Agent with Fleet Server and auto-enroll.

There seems to be an issue with https://github.com/elastic/e2e-testing/compare/master...jalvz:fleet-server-standalone?expand=1#diff-a6c6a3ad6fe70a90f2f59acfe75e589cd5aa7ca78361c2e26472bd2d0bb4f44eL15, removing that line the Agent enrolls correctly.

With that line, the error looks like: /usr/share/elastic-agent/elastic-agent.yml: rename /usr/share/elastic-agent/elastic-agent.yml /usr/share/elastic-agent/elastic-agent.yml.2021-03-31T14-16-29.6932.bak: device or resource busy
Not sure what that is.

For reference, the following also works:

docker run --network fleet_default -e KIBANA_HOST=http://kibana:5601 -e KIBANA_USERNAME=elastic -e KIBANA_PASSWORD=changeme -e KIBANA_FLEET_SETUP=1 -e FLEET_SERVER_ENABLE=1 -e FLEET_SERVER_INSECURE_HTTP=1 -e FLEET_SERVER_HOST=0.0.0.0 -p 8220:8220 docker.elastic.co/beats/elastic-agent:8.0.0-SNAPSHOT

version: '2.4'
networks:
  default:
    name: "fleet_default"
services:
  elastic-agent:
    image: docker.elastic.co/beats/elastic-agent:8.0.0-SNAPSHOT
    container_name: elastic-agent-foo
    environment:
      - "KIBANA_HOST=http://kibana:5601"
      - "FLEET_SERVER_ENABLE=1"
      - "FLEET_SERVER_INSECURE_HTTP=1"
      - "KIBANA_FLEET_SETUP=1"
      - "FLEET_SERVER_HOST=0.0.0.0"
      - "KIBANA_USERNAME=elastic"
      - "KIBANA_PASSWORD=changeme"
    ports:
      - "127.0.0.1:8220:8220"

Why is it important?

Required for upcoming tests

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)

Related issues

Related to #900

@jalvz jalvz added the enhancement New feature or request label Mar 31, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

💔 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 #978 opened

  • Start Time: 2021-03-31T14:33:02.699+0000

  • Duration: 25 min 52 sec

  • Commit: 4156357

Test stats 🧪

Test Results
Failed 2
Passed 136
Skipped 0
Total 138

Trends 🧪

Image of Build Times

Image of Tests

Test errors 2

Expand to view the tests failures

Initializing / End-To-End Tests / ubuntu-18.04_fleet_backend_processes / Un-installing the installed centos agent – Backend Processes
    Expand to view the error details

     Step the "elastic-agent" process is in the "stopped" state on the host 
    

  • no stacktrace
Initializing / End-To-End Tests / ubuntu-18.04_fleet_stand_alone_agent / Deploying a default stand-alone agent with fleet server mode – Stand-alone Agent
    Expand to view the error details

     Step the agent is listed in Fleet as "online": The agent is not present in Fleet, but it should 
    

  • no stacktrace

Steps errors 2

Expand to view the steps failures

Run functional tests for fleet:stand_alone_agent && ~@nightly && ~ubi8
  • Took 17 min 12 sec . View more details on here
  • Description: .ci/scripts/functional-test.sh "fleet" "stand_alone_agent && ~@nightly && ~ubi8" "8.0.0-SNAPSHOT" "8.0.0-SNAPSHOT"
Run functional tests for fleet:backend_processes && ~@nightly && ~debian
  • Took 10 min 16 sec . View more details on here
  • Description: .ci/scripts/functional-test.sh "fleet" "backend_processes && ~@nightly && ~debian" "8.0.0-SNAPSHOT" "8.0.0-SNAPSHOT"

Log output

Expand to view the last 100 lines of log output

[2021-03-31T14:57:16.372Z] {"log.level":"info","@timestamp":"2021-03-31T14:56:53.599Z","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":64},"message":"Metrics endpoint listening on: /tmp/elastic-agent/elastic-agent.sock (configured: unix:///tmp/elastic-agent/elastic-agent.sock)","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.372Z] {"log.level":"warn","@timestamp":"2021-03-31T14:56:53.700Z","log.origin":{"file.name":"application/managed_mode.go","file.line":297},"message":"failed to ack update open /opt/Elastic/Agent/data/.update-marker: no such file or directory","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.372Z] {"log.level":"info","@timestamp":"2021-03-31T14:56:55.517Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":48},"message":"New State ID is 0RxbifSX","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.372Z] {"log.level":"info","@timestamp":"2021-03-31T14:56:55.517Z","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-03-31T14:57:16.372Z] {"log.level":"info","@timestamp":"2021-03-31T14:56:55.517Z","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-2b00b8/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.372Z] {"log.level":"info","@timestamp":"2021-03-31T14:56:55.517Z","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-2b00b8/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.372Z] {"log.level":"info","@timestamp":"2021-03-31T14:56:59.478Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-31T14:56:59Z: type: 'STATE': sub_type: 'STARTING' message: Application: filebeat--8.0.0-SNAPSHOT[38344f68-39a7-48b5-b2e9-da241eaa84f1]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.372Z] {"log.level":"info","@timestamp":"2021-03-31T14:56:59.479Z","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-2b00b8/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:56:59.480Z","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-2b00b8/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:00.596Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-31T14:57:00Z: type: 'STATE': sub_type: 'RUNNING' message: Application: filebeat--8.0.0-SNAPSHOT[38344f68-39a7-48b5-b2e9-da241eaa84f1]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:02.336Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-31T14:57:02Z: type: 'STATE': sub_type: 'STARTING' message: Application: metricbeat--8.0.0-SNAPSHOT[38344f68-39a7-48b5-b2e9-da241eaa84f1]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:02.339Z","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-2b00b8/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:02.339Z","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-2b00b8/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:02.519Z","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-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:02.598Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-31T14:57:02Z: type: 'STATE': sub_type: 'STARTING' message: Application: filebeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[38344f68-39a7-48b5-b2e9-da241eaa84f1]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:02.599Z","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-2b00b8/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:02.599Z","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-2b00b8/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:02.823Z","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-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:03.048Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-31T14:57:03Z: type: 'STATE': sub_type: 'STARTING' message: Application: metricbeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[38344f68-39a7-48b5-b2e9-da241eaa84f1]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:03.050Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":66},"message":"Updating internal state","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:03.477Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-31T14:57:03Z: type: 'STATE': sub_type: 'RUNNING' message: Application: metricbeat--8.0.0-SNAPSHOT[38344f68-39a7-48b5-b2e9-da241eaa84f1]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:03.707Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-31T14:57:03Z: type: 'STATE': sub_type: 'RUNNING' message: Application: filebeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[38344f68-39a7-48b5-b2e9-da241eaa84f1]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.373Z] {"log.level":"info","@timestamp":"2021-03-31T14:57:04.187Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-31T14:57:04Z: type: 'STATE': sub_type: 'RUNNING' message: Application: metricbeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[38344f68-39a7-48b5-b2e9-da241eaa84f1]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-03-31T14:57:16.374Z] time="2021-03-31T14:57:16Z" level=debug msg="Docker compose executed." cmd="[exec -T centos-systemd cat /opt/Elastic/Agent/data/elastic-agent-2b00b8/logs//elastic-agent-json.log]" composeFilePaths="[/var/lib/jenkins/workspace/PR-978-1-cf8082a8-5633-44b8-a5fd-ec00dfb20f8c/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/PR-978-1-cf8082a8-5633-44b8-a5fd-ec00dfb20f8c/.op/compose/services/centos-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz046003889 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz centos_systemdContainerName:fleet_centos-systemd_elastic-agent_1 centos_systemdTag:latest stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-03-31T14:57:18.282Z] Elastic Agent has been uninstalled.
[2021-03-31T14:57:18.543Z] time="2021-03-31T14:57:18Z" level=debug msg="Docker compose executed." cmd="[exec -T centos-systemd elastic-agent uninstall -f]" composeFilePaths="[/var/lib/jenkins/workspace/PR-978-1-cf8082a8-5633-44b8-a5fd-ec00dfb20f8c/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/PR-978-1-cf8082a8-5633-44b8-a5fd-ec00dfb20f8c/.op/compose/services/centos-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz046003889 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz centos_systemdContainerName:fleet_centos-systemd_elastic-agent_1 centos_systemdTag:latest stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-03-31T14:57:18.543Z] time="2021-03-31T14:57:18Z" level=debug msg="Un-enrolling agent in Fleet" agentID=38344f68-39a7-48b5-b2e9-da241eaa84f1 hostname=c46563eed7da
[2021-03-31T14:57:19.483Z] time="2021-03-31T14:57:19Z" level=debug msg="Fleet agent was unenrolled" agentID=38344f68-39a7-48b5-b2e9-da241eaa84f1
[2021-03-31T14:57:20.422Z] {"level":"debug","time":"2021-03-31T14:57:20Z","message":"gathering metrics"}
[2021-03-31T14:57:20.423Z] Stopping fleet_centos-systemd_elastic-agent_1 ... 
[2021-03-31T14:57:30.407Z] {"level":"debug","time":"2021-03-31T14:57:30Z","message":"sent request with 0 transactions, 0 spans, 0 errors, 1 metricset"}
[2021-03-31T14:57:31.346Z] 
Stopping fleet_centos-systemd_elastic-agent_1 ... done
Removing fleet_centos-systemd_elastic-agent_1 ... 
[2021-03-31T14:57:31.346Z] 
Removing fleet_centos-systemd_elastic-agent_1 ... done
Going to remove fleet_centos-systemd_elastic-agent_1
[2021-03-31T14:57:31.346Z] time="2021-03-31T14:57:31Z" level=debug msg="Docker compose executed." cmd="[rm -fvs centos-systemd]" composeFilePaths="[/var/lib/jenkins/workspace/PR-978-1-cf8082a8-5633-44b8-a5fd-ec00dfb20f8c/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/PR-978-1-cf8082a8-5633-44b8-a5fd-ec00dfb20f8c/.op/compose/services/centos-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz046003889 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz centos_systemdContainerName:fleet_centos-systemd_elastic-agent_1 centos_systemdTag:latest stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-03-31T14:57:31.346Z] time="2021-03-31T14:57:31Z" level=debug msg="Service removed from compose" profile=fleet service=centos-systemd
[2021-03-31T14:57:32.284Z] time="2021-03-31T14:57:32Z" level=debug msg="The token was deleted" tokenID=d6820b86-6931-48ac-832c-22edfa41dce6
[2021-03-31T14:57:32.284Z] time="2021-03-31T14:57:32Z" level=info msg="Integration deleted from the configuration" integration=endpoint packageConfigId=9802d342-31a2-4903-8dd9-cbce2036fc6c policyID=5aa4cc80-922f-11eb-8944-67ba17c13507 version=0.18.0
[2021-03-31T14:57:32.284Z] time="2021-03-31T14:57:32Z" level=debug msg="Destroying Fleet runtime dependencies"
[2021-03-31T14:57:33.226Z] Stopping fleet_kibana_1           ... 
[2021-03-31T14:57:33.226Z] Stopping fleet_package-registry_1 ... 
[2021-03-31T14:57:33.226Z] Stopping fleet_elasticsearch_1    ... 
[2021-03-31T14:57:34.685Z] 
Stopping fleet_kibana_1           ... done

Stopping fleet_package-registry_1 ... done

Stopping fleet_elasticsearch_1    ... done
Removing fleet_kibana_1           ... 
[2021-03-31T14:57:34.685Z] Removing fleet_package-registry_1 ... 
[2021-03-31T14:57:34.685Z] Removing fleet_elasticsearch_1    ... 
[2021-03-31T14:57:34.685Z] 
Removing fleet_package-registry_1 ... done

Removing fleet_kibana_1           ... done

Removing fleet_elasticsearch_1    ... done
Removing network fleet_default
[2021-03-31T14:57:34.945Z] time="2021-03-31T14:57:34Z" level=debug msg="Docker compose executed." cmd="[down --remove-orphans]" composeFilePaths="[/var/lib/jenkins/workspace/PR-978-1-cf8082a8-5633-44b8-a5fd-ec00dfb20f8c/.op/compose/profiles/fleet/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz046003889 centos_systemdAgentBinaryTargetPath:/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz centos_systemdContainerName:fleet_centos-systemd_elastic-agent_1 centos_systemdTag:latest stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-03-31T14:57:34.945Z] time="2021-03-31T14:57:34Z" 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.gz046003889
[2021-03-31T14:57:35.271Z] [INFO] Stopping Filebeat Docker container
[2021-03-31T14:57:35.575Z] + docker exec -t b62f21e926469012abfa4f53923ba0d3a26e401225384674b4eb822b3e9d1ad1 chmod -R ugo+rw /output
[2021-03-31T14:57:35.835Z] + docker stop --time 30 b62f21e926469012abfa4f53923ba0d3a26e401225384674b4eb822b3e9d1ad1
[2021-03-31T14:57:36.095Z] b62f21e926469012abfa4f53923ba0d3a26e401225384674b4eb822b3e9d1ad1
[2021-03-31T14:57:36.140Z] Archiving artifacts
[2021-03-31T14:57:36.973Z] Recording test results
[2021-03-31T14:57:37.312Z] [Checks API] No suitable checks publisher found.
[2021-03-31T14:57:37.345Z] Archiving artifacts
[2021-03-31T14:57:37.446Z] Running in /var/lib/jenkins/workspace/PR-978-1-cf8082a8-5633-44b8-a5fd-ec00dfb20f8c/src/github.com/elastic/e2e-testing
[2021-03-31T14:57:37.783Z] + go clean -modcache
[2021-03-31T14:57:38.037Z] {"level":"debug","time":"2021-03-31T14:57:34Z","message":"gathering metrics"}
[2021-03-31T14:57:42.247Z] Attaching to fleet_elastic-agent_1
[2021-03-31T14:57:42.247Z] elastic-agent_1     | Performing setup of Fleet in Kibana
[2021-03-31T14:57:42.247Z] elastic-agent_1     | The Elastic Agent is currently in BETA and should not be used in production
[2021-03-31T14:57:42.247Z] elastic-agent_1     | 
[2021-03-31T14:57:42.247Z] elastic-agent_1     | Error: could not save enrollment information: could not backup /usr/share/elastic-agent/elastic-agent.yml: rename /usr/share/elastic-agent/elastic-agent.yml /usr/share/elastic-agent/elastic-agent.yml.2021-03-31T14-47-45.039.bak: device or resource busy
[2021-03-31T14:57:42.247Z] elastic-agent_1     | Error: enrollment failed: exit status 1
[2021-03-31T14:57:42.247Z] time="2021-03-31T14:57:41Z" level=debug msg="Docker compose executed." cmd="[logs elastic-agent]" composeFilePaths="[/var/lib/jenkins/workspace/PR-978-1-2f891c49-f339-4bba-90e7-9ff77feb155e/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/PR-978-1-2f891c49-f339-4bba-90e7-9ff77feb155e/.op/compose/services/elastic-agent/docker-compose.yml]" env="map[elasticAgentConfigFile:/tmp/elastic-agent.docker.yml967945943 elasticAgentContainerName:fleet_elastic-agent_1 elasticAgentDockerImageSuffix: elasticAgentDockerNamespace:beats elasticAgentPlatform:linux/amd64 elasticAgentTag:8.0.0-SNAPSHOT fleetServerMode:1 stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-03-31T14:57:42.819Z] Removing fleet_elastic-agent_1 ... 
[2021-03-31T14:57:42.819Z] 
Removing fleet_elastic-agent_1 ... done
Going to remove fleet_elastic-agent_1
[2021-03-31T14:57:42.820Z] time="2021-03-31T14:57:42Z" level=debug msg="Docker compose executed." cmd="[rm -fvs elastic-agent]" composeFilePaths="[/var/lib/jenkins/workspace/PR-978-1-2f891c49-f339-4bba-90e7-9ff77feb155e/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/PR-978-1-2f891c49-f339-4bba-90e7-9ff77feb155e/.op/compose/services/elastic-agent/docker-compose.yml]" env="map[elasticAgentConfigFile:/tmp/elastic-agent.docker.yml967945943 elasticAgentContainerName:fleet_elastic-agent_1 elasticAgentDockerImageSuffix: elasticAgentDockerNamespace:beats elasticAgentPlatform:linux/amd64 elasticAgentTag:8.0.0-SNAPSHOT fleetServerMode:1 stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-03-31T14:57:42.820Z] time="2021-03-31T14:57:42Z" level=debug msg="Service removed from compose" profile=fleet service=elastic-agent
[2021-03-31T14:57:42.820Z] time="2021-03-31T14:57:42Z" level=debug msg="Destroying Fleet runtime dependencies"
[2021-03-31T14:57:43.760Z] Stopping fleet_kibana_1           ... 
[2021-03-31T14:57:43.760Z] Stopping fleet_elasticsearch_1    ... 
[2021-03-31T14:57:43.760Z] Stopping fleet_package-registry_1 ... 
[2021-03-31T14:57:44.871Z] 
Stopping fleet_kibana_1           ... done

Stopping fleet_package-registry_1 ... done

Stopping fleet_elasticsearch_1    ... done
Removing fleet_kibana_1           ... 
[2021-03-31T14:57:44.871Z] Removing fleet_elasticsearch_1    ... 
[2021-03-31T14:57:44.871Z] Removing fleet_package-registry_1 ... 
[2021-03-31T14:57:44.871Z] 
Removing fleet_package-registry_1 ... done

Removing fleet_kibana_1           ... done
{"level":"debug","time":"2021-03-31T14:57:44Z","message":"sent request with 0 transactions, 0 spans, 0 errors, 1 metricset"}
[2021-03-31T14:57:44.871Z] 
Removing fleet_elasticsearch_1    ... done
Removing network fleet_default
[2021-03-31T14:57:45.443Z] time="2021-03-31T14:57:45Z" level=debug msg="Docker compose executed." cmd="[down --remove-orphans]" composeFilePaths="[/var/lib/jenkins/workspace/PR-978-1-2f891c49-f339-4bba-90e7-9ff77feb155e/.op/compose/profiles/fleet/docker-compose.yml]" env="map[elasticAgentConfigFile:/tmp/elastic-agent.docker.yml967945943 elasticAgentContainerName:fleet_elastic-agent_1 elasticAgentDockerImageSuffix: elasticAgentDockerNamespace:beats elasticAgentPlatform:linux/amd64 elasticAgentTag:8.0.0-SNAPSHOT fleetServerMode:1 stackVersion:8.0.0-SNAPSHOT]" profile=fleet
[2021-03-31T14:57:45.443Z] Makefile:73: recipe for target 'functional-test' failed
[2021-03-31T14:57:45.443Z] make: *** [functional-test] Error 1
[2021-03-31T14:57:45.797Z] [INFO] Stopping Filebeat Docker container
[2021-03-31T14:57:46.110Z] + docker exec -t c52ec87cc246bda2ce567570fbfc9cd78fa228089552a25063a5d358abd17a0b chmod -R ugo+rw /output
[2021-03-31T14:57:46.370Z] + docker stop --time 30 c52ec87cc246bda2ce567570fbfc9cd78fa228089552a25063a5d358abd17a0b
[2021-03-31T14:57:46.944Z] c52ec87cc246bda2ce567570fbfc9cd78fa228089552a25063a5d358abd17a0b
[2021-03-31T14:57:46.997Z] Archiving artifacts
[2021-03-31T14:57:47.765Z] Recording test results
[2021-03-31T14:57:48.277Z] [Checks API] No suitable checks publisher found.
[2021-03-31T14:57:48.324Z] Archiving artifacts
[2021-03-31T14:57:48.416Z] Running in /var/lib/jenkins/workspace/PR-978-1-2f891c49-f339-4bba-90e7-9ff77feb155e/src/github.com/elastic/e2e-testing
[2021-03-31T14:57:48.774Z] + go clean -modcache
[2021-03-31T14:57:49.789Z] Failed in branch ubuntu-18.04_fleet_stand_alone_agent
[2021-03-31T14:57:52.725Z] Stage "Release" skipped due to earlier failure(s)
[2021-03-31T14:57:54.093Z] Running on Jenkins in /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-978
[2021-03-31T14:57:54.206Z] [INFO] getVaultSecret: Getting secrets
[2021-03-31T14:57:54.332Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-03-31T14:57:55.333Z] + chmod 755 generate-build-data.sh
[2021-03-31T14:57:55.333Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-978/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-978/runs/1 FAILURE 1492356
[2021-03-31T14:57:55.884Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-978/runs/1/steps/?limit=10000 -o steps-info.json
[2021-03-31T14:57:56.962Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-978/runs/1/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 2
Passed 136
Skipped 0
Total 138

Genuine test errors 2

💔 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_backend_processes / Un-installing the installed centos agent – Backend Processes
  • Name: Initializing / End-To-End Tests / ubuntu-18.04_fleet_stand_alone_agent / Deploying a default stand-alone agent with fleet server mode – Stand-alone Agent

@adam-stokes
Copy link
Copy Markdown
Contributor

I think this could solve #958 as well? We want to move toward having the ability for the cli to easily run scenarios the CI would do. Currently running op run profile fleet -s elastic-agent:8.0.0-SNAPSHOT will fail to enroll due to missing environment options.

@adam-stokes
Copy link
Copy Markdown
Contributor

There seems to be an issue with https://github.com/elastic/e2e-testing/compare/master...jalvz:fleet-server-standalone?expand=1#diff-a6c6a3ad6fe70a90f2f59acfe75e589cd5aa7ca78361c2e26472bd2d0bb4f44eL15, removing that line the Agent enrolls correctly.

This should be handled by:

configurationFilePath, err := steps.FetchBeatConfiguration(true, "elastic-agent", "elastic-agent.docker.yml")

@adam-stokes adam-stokes merged commit 83ace74 into elastic:master Mar 31, 2021
@jalvz
Copy link
Copy Markdown
Contributor Author

jalvz commented Apr 1, 2021

I am on holiday until Thursday, but I think that test failures are legitimate and this merge should be reverted.
I didn't tick any boxes from the checklist to signal that this was not ready yet, but probably should have opened it as WIP. Sorry for that.

@mdelapenya
Copy link
Copy Markdown
Contributor

I added the labels too fast, without reading #978 (comment). Let's not merge those backports until the fix is done.

adam-stokes pushed a commit that referenced this pull request Apr 6, 2021
(cherry picked from commit 83ace74)

Co-authored-by: Juan Álvarez <juan.alvarez@elastic.co>
adam-stokes pushed a commit that referenced this pull request Apr 6, 2021
(cherry picked from commit 83ace74)

Co-authored-by: Juan Álvarez <juan.alvarez@elastic.co>
adam-stokes pushed a commit that referenced this pull request Apr 6, 2021
(cherry picked from commit 83ace74)

Co-authored-by: Juan Álvarez <juan.alvarez@elastic.co>
@jalvz jalvz mentioned this pull request Apr 6, 2021
8 tasks
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 8, 2021
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 8, 2021
mdelapenya added a commit that referenced this pull request Apr 8, 2021
* Revert "Uniquify the stand-alone step for checking agent status (#993) (#996)"

This reverts commit 9818d67.

* Revert "Add a standalone test scenario for fleet server mode (#978) (#987)"

This reverts commit a42c0ce.
mdelapenya added a commit that referenced this pull request Apr 8, 2021
* Revert "Uniquify the stand-alone step for checking agent status (#993) (#997)"

This reverts commit 435c45b.

* Revert "Add a standalone test scenario for fleet server mode (#978) (#988)"

This reverts commit 601064a.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants