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

Add basic check on correct service is defined for profile runs #957

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

adam-stokes
Copy link
Contributor

This adds a length check on the string split for verifying that the
<service/image name>:<tag> is defined when adding additional services to a
profile deployment.

Signed-off-by: Adam Stokes [email protected]

What does this PR do?

This PR provides a simple length check during the splitting of services when being added to a profile run

Why is it important?

Before there was no validation that a service was properly defined when being added to a profile run, so a command like the following would attempt to run:

go run main.go run profile fleet -s elastic-agent

We now check that at least 2 tokens exist for the : and exit if not found with a helpful error message.

go run main.go run profile fleet -s elastic-agent
DEBU[0000] Docker compose executed.                      cmd="[up -d]" composeFilePaths="[/Users/adam/.op/compose/profiles/fleet/docker-compose.yml]" env="map[profileVersion:latest]" profile=fleet
TRAC[0000] Updating state                                dir=/Users/adam/.op stateFile=/Users/adam/.op/fleet-profile.run
TRAC[0000] State updated                                 dir=/Users/adam/.op stateFile=/Users/adam/.op/fleet-profile.run
ERRO[0000] Unable to determine the <image>:<tag>, please make sure to use a known docker tag format, eg. `-s elastic-agent:8.0.0-SNAPSHOT`  profile=fleet services=elastic-agent
exit status 1

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)

Author's Checklist

  • [ ]

How to test this PR locally

± OP_LOG_LEVEL=TRACE go run main.go run profile fleet -s elastic-agent:8.0.0-SNAPSHOT

Verify that a Fleet server is deployed with an elastic agent attached

Related issues

Fixes #944

This adds a length check on the string split for verifying that the
<service/image name>:<tag> is defined when adding additional services to a
profile deployment.

Signed-off-by: Adam Stokes <[email protected]>
@adam-stokes adam-stokes added the bug Something isn't working label Mar 29, 2021
@adam-stokes adam-stokes requested a review from a team March 29, 2021 18:39
@elasticmachine
Copy link
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 #957 opened

  • Start Time: 2021-03-29T18:38:40.135+0000

  • Duration: 25 min 3 sec

  • Commit: f46687e

Test stats 🧪

Test Results
Failed 1
Passed 136
Skipped 0
Total 137

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_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

Steps errors 1

Expand to view the steps failures

Run functional tests for fleet:backend_processes && ~@nightly && ~debian
  • Took 12 min 37 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-29T19:02:55.877Z] time="2021-03-29T19:02:55Z" level=debug msg="Integration in latest version found" name=endpoint title="Endpoint Security" version=0.18.0
[2021-03-29T19:03:00.080Z] time="2021-03-29T19:02:59Z" level=info msg="Integration added to the configuration" integration=endpoint integrationConfigurationID=29e5c9e3-c9be-4405-89a4-3430c53edea0 policyID=5b0e9e10-90bf-11eb-88fb-4f4eaafa3807 version=0.18.0
[2021-03-29T19:03:00.080Z] time="2021-03-29T19:03:00Z" level=debug msg="Package policy found in the configuration" package="{29e5c9e3-c9be-4405-89a4-3430c53edea0 endpoint Endpoint Security 0.18.0 0xc00061fc50}" policyID=5b0e9e10-90bf-11eb-88fb-4f4eaafa3807
[2021-03-29T19:03:03.373Z] time="2021-03-29T19:03:02Z" level=info msg="Integration deleted from the configuration" integration=endpoint packageConfigId=29e5c9e3-c9be-4405-89a4-3430c53edea0 policyID=5b0e9e10-90bf-11eb-88fb-4f4eaafa3807 version=0.18.0
[2021-03-29T19:03:03.373Z] time="2021-03-29T19:03:03Z" level=debug msg="Agent listed in Fleet with online status" agentID=cba53475-6f31-49ca-86ef-089a1044e732 hostname=e9d123dfe4cf
[2021-03-29T19:03:03.373Z] time="2021-03-29T19:03:03Z" level=info msg="The Agent is in the desired status" elapsedTime=67.462407ms hostname=e9d123dfe4cf isAgentInStatus=true retries=1 status=online
[2021-03-29T19:03:03.373Z] time="2021-03-29T19:03:03Z" level=info msg="The Agent is not listed in the Administration view in the Security App" elapsedTime=25.925198ms hostname=e9d123dfe4cf retries=1
[2021-03-29T19:03:03.944Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:38.224Z","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-03-29T19:03:03.944Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:38.225Z","log.origin":{"file.name":"application/application.go","file.line":66},"message":"Detecting execution mode","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.944Z] {"log.level":"warn","@timestamp":"2021-03-29T19:02:38.225Z","log.logger":"cfgwarn","log.origin":{"file.name":"tlscommon/config.go","file.line":101},"message":"DEPRECATED: Treating the CommonName field on X.509 certificates as a host name when no Subject Alternative Names are present is going to be removed. Please update your certificates if needed. Will be removed in version: 8.0.0","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.944Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:38.225Z","log.origin":{"file.name":"application/application.go","file.line":91},"message":"Agent is managed by Fleet","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.944Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:38.226Z","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-03-29T19:03:03.944Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:38.443Z","log.logger":"composable","log.origin":{"file.name":"composable/controller.go","file.line":44},"message":"EXPERIMENTAL - Inputs with variables are currently experimental and should not be used in production","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.944Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:38.545Z","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-03-29T19:03:03.945Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:38.546Z","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":62},"message":"Starting stats endpoint","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.945Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:38.546Z","log.origin":{"file.name":"application/managed_mode.go","file.line":284},"message":"Agent is starting","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.945Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:38.546Z","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-29T19:03:03.945Z] {"log.level":"warn","@timestamp":"2021-03-29T19:02:38.647Z","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-29T19:03:03.945Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:40.265Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":48},"message":"New State ID is 6FYd8vVV","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.945Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:40.265Z","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-29T19:03:03.945Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:40.265Z","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-335911/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.945Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:40.265Z","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-335911/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.945Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:44.148Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-29T19:02:44Z: type: 'STATE': sub_type: 'STARTING' message: Application: filebeat--8.0.0-SNAPSHOT[cba53475-6f31-49ca-86ef-089a1044e732]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.945Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:44.149Z","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-335911/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.945Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:44.149Z","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-335911/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:45.262Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-29T19:02:45Z: type: 'STATE': sub_type: 'RUNNING' message: Application: filebeat--8.0.0-SNAPSHOT[cba53475-6f31-49ca-86ef-089a1044e732]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:46.788Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-29T19:02:46Z: type: 'STATE': sub_type: 'STARTING' message: Application: metricbeat--8.0.0-SNAPSHOT[cba53475-6f31-49ca-86ef-089a1044e732]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:46.790Z","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-335911/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:46.790Z","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-335911/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:46.969Z","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-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:47.253Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-29T19:02:47Z: type: 'STATE': sub_type: 'STARTING' message: Application: filebeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[cba53475-6f31-49ca-86ef-089a1044e732]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:47.254Z","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-335911/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:47.254Z","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-335911/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:47.491Z","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-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:47.942Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-29T19:02:47Z: type: 'STATE': sub_type: 'RUNNING' message: Application: metricbeat--8.0.0-SNAPSHOT[cba53475-6f31-49ca-86ef-089a1044e732]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.946Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:48.193Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-29T19:02:48Z: type: 'STATE': sub_type: 'STARTING' message: Application: metricbeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[cba53475-6f31-49ca-86ef-089a1044e732]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:48.194Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":66},"message":"Updating internal state","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:48.389Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-29T19:02:48Z: type: 'STATE': sub_type: 'RUNNING' message: Application: filebeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[cba53475-6f31-49ca-86ef-089a1044e732]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:02:49.325Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-29T19:02:49Z: type: 'STATE': sub_type: 'RUNNING' message: Application: metricbeat--8.0.0-SNAPSHOT--36643631373035623733363936343635[cba53475-6f31-49ca-86ef-089a1044e732]: State changed to RUNNING: Running","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:01.978Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":48},"message":"New State ID is FsxSHviu","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:01.978Z","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-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:01.979Z","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-335911/downloads/endpoint-security-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:01.979Z","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-335911/downloads/endpoint-security-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:02.671Z","log.origin":{"file.name":"log/reporter.go","file.line":40},"message":"2021-03-29T19:03:02Z: type: 'STATE': sub_type: 'STARTING' message: Application: endpoint-security--8.0.0-SNAPSHOT[cba53475-6f31-49ca-86ef-089a1044e732]: State changed to STARTING: Starting","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.157Z","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-335911/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.157Z","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-335911/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.351Z","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-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.351Z","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-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.353Z","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-335911/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.353Z","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-335911/downloads/filebeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.515Z","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-29T19:03:03.947Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.515Z","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-03-29T19:03:03.948Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.516Z","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-335911/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.948Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.516Z","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-335911/downloads/metricbeat-8.0.0-SNAPSHOT-linux-x86_64.tar.gz. Skipping operation operation-fetch","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.948Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.709Z","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-29T19:03:03.948Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.709Z","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-03-29T19:03:03.948Z] {"log.level":"info","@timestamp":"2021-03-29T19:03:03.710Z","log.origin":{"file.name":"stateresolver/stateresolver.go","file.line":66},"message":"Updating internal state","ecs.version":"1.6.0"}
[2021-03-29T19:03:03.948Z] time="2021-03-29T19:03:03Z" level=debug msg="Docker compose executed." cmd="[exec -T centos-systemd cat /opt/Elastic/Agent//data/elastic-agent-335911/logs//elastic-agent-json.log]" composeFilePaths="[/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-957/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-957/.op/compose/services/centos-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz218191842 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-29T19:03:16.172Z] {"level":"debug","time":"2021-03-29T19:03:14Z","message":"gathering metrics"}
[2021-03-29T19:03:18.712Z] Elastic Agent has been uninstalled.
[2021-03-29T19:03:18.712Z] time="2021-03-29T19:03:18Z" level=debug msg="Docker compose executed." cmd="[exec -T centos-systemd elastic-agent uninstall -f]" composeFilePaths="[/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-957/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-957/.op/compose/services/centos-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz218191842 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-29T19:03:18.712Z] time="2021-03-29T19:03:18Z" level=debug msg="Un-enrolling agent in Fleet" agentID=cba53475-6f31-49ca-86ef-089a1044e732 hostname=e9d123dfe4cf
[2021-03-29T19:03:19.283Z] time="2021-03-29T19:03:19Z" level=debug msg="Fleet agent was unenrolled" agentID=cba53475-6f31-49ca-86ef-089a1044e732
[2021-03-29T19:03:20.226Z] Stopping fleet_centos-systemd_elastic-agent_1 ... 
[2021-03-29T19:03:24.431Z] {"level":"debug","time":"2021-03-29T19:03:24Z","message":"sent request with 0 transactions, 0 spans, 0 errors, 1 metricset"}
[2021-03-29T19:03:31.046Z] 
Stopping fleet_centos-systemd_elastic-agent_1 ... done
Removing fleet_centos-systemd_elastic-agent_1 ... 
[2021-03-29T19:03:31.046Z] 
Removing fleet_centos-systemd_elastic-agent_1 ... done
Going to remove fleet_centos-systemd_elastic-agent_1
[2021-03-29T19:03:31.046Z] time="2021-03-29T19:03:30Z" level=debug msg="Docker compose executed." cmd="[rm -fvs centos-systemd]" composeFilePaths="[/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-957/.op/compose/profiles/fleet/docker-compose.yml /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-957/.op/compose/services/centos-systemd/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz218191842 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-29T19:03:31.046Z] time="2021-03-29T19:03:30Z" level=debug msg="Service removed from compose" profile=fleet service=centos-systemd
[2021-03-29T19:03:32.957Z] time="2021-03-29T19:03:32Z" level=debug msg="The token was deleted" tokenID=9234f8a9-567d-4c86-ad0d-bde19743c3ca
[2021-03-29T19:03:32.957Z] time="2021-03-29T19:03:32Z" level=info msg="Integration deleted from the configuration" integration=endpoint packageConfigId=29e5c9e3-c9be-4405-89a4-3430c53edea0 policyID=5b0e9e10-90bf-11eb-88fb-4f4eaafa3807 version=0.18.0
[2021-03-29T19:03:32.957Z] time="2021-03-29T19:03:32Z" level=debug msg="Destroying Fleet runtime dependencies"
[2021-03-29T19:03:33.526Z] Stopping fleet_kibana_1           ... 
[2021-03-29T19:03:33.526Z] Stopping fleet_package-registry_1 ... 
[2021-03-29T19:03:33.526Z] Stopping fleet_elasticsearch_1    ... 
[2021-03-29T19:03:34.721Z] 
Stopping fleet_kibana_1           ... done

Stopping fleet_package-registry_1 ... done

Stopping fleet_elasticsearch_1    ... done
Removing fleet_kibana_1           ... 
[2021-03-29T19:03:34.722Z] Removing fleet_package-registry_1 ... 
[2021-03-29T19:03:34.722Z] Removing fleet_elasticsearch_1    ... 
[2021-03-29T19:03:34.981Z] 
Removing fleet_kibana_1           ... done

Removing fleet_package-registry_1 ... done

Removing fleet_elasticsearch_1    ... done
Removing network fleet_default
[2021-03-29T19:03:35.242Z] time="2021-03-29T19:03:35Z" level=debug msg="Docker compose executed." cmd="[down --remove-orphans]" composeFilePaths="[/var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-957/.op/compose/profiles/fleet/docker-compose.yml]" env="map[centos_systemdAgentBinarySrcPath:/tmp/elastic-agent-8.0.0-SNAPSHOT-linux-x86_64.tar.gz218191842 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-29T19:03:35.242Z] time="2021-03-29T19:03:35Z" 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.gz218191842
[2021-03-29T19:03:35.587Z] [INFO] Stopping Filebeat Docker container
[2021-03-29T19:03:35.890Z] + docker exec -t d8fa87f47b0e5c363e179389bb062c79fda8de71e5145eed0ce64a32e61f7b91 chmod -R ugo+rw /output
[2021-03-29T19:03:36.151Z] + docker stop --time 30 d8fa87f47b0e5c363e179389bb062c79fda8de71e5145eed0ce64a32e61f7b91
[2021-03-29T19:03:36.411Z] d8fa87f47b0e5c363e179389bb062c79fda8de71e5145eed0ce64a32e61f7b91
[2021-03-29T19:03:36.448Z] Archiving artifacts
[2021-03-29T19:03:37.142Z] Recording test results
[2021-03-29T19:03:37.511Z] [Checks API] No suitable checks publisher found.
[2021-03-29T19:03:37.546Z] Archiving artifacts
[2021-03-29T19:03:37.647Z] Running in /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-957/src/github.com/elastic/e2e-testing
[2021-03-29T19:03:37.987Z] + go clean -modcache
[2021-03-29T19:03:40.291Z] Stage "Release" skipped due to earlier failure(s)
[2021-03-29T19:03:41.862Z] Running on worker-395930 in /var/lib/jenkins/workspace/e2e-tests_e2e-testing-mbp_PR-957
[2021-03-29T19:03:41.965Z] [INFO] getVaultSecret: Getting secrets
[2021-03-29T19:03:42.066Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-03-29T19:03:44.999Z] + chmod 755 generate-build-data.sh
[2021-03-29T19:03:44.999Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-957/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-957/runs/1 FAILURE 1502868
[2021-03-29T19:03:44.999Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-957/runs/1/steps/?limit=10000 -o steps-info.json
[2021-03-29T19:03:46.451Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-957/runs/1/tests/?status=FAILED -o tests-errors.json
[2021-03-29T19:03:47.153Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/e2e-tests/e2e-testing-mbp/PR-957/runs/1/log/ -o pipeline-log.txt

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Test stats 🧪

Test Results
Failed 1
Passed 136
Skipped 0
Total 137

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_backend_processes / Un-installing the installed centos agent – Backend Processes

@adam-stokes adam-stokes merged commit 51339fa into master Mar 29, 2021
@adam-stokes adam-stokes deleted the gh-fix-944 branch March 29, 2021 23:17
mdelapenya pushed a commit to mdelapenya/e2e-testing that referenced this pull request Apr 22, 2021
…ic#957)

Fixes elastic#944

This adds a length check on the string split for verifying that the
<service/image name>:<tag> is defined when adding additional services to a
profile deployment.

Signed-off-by: Adam Stokes <[email protected]>
@mdelapenya mdelapenya mentioned this pull request Apr 22, 2021
9 tasks
mdelapenya added a commit that referenced this pull request Apr 22, 2021
* cli: enable loading default profiles turnkey (#943)

* cli: enable loading default profiles turnkey

Fixes #933
* update NOTICE
* Fix additional lint issues in ingest_manager_test
* Cleanup comment and trace log in GetComposeFile
* Provide better trace feedback if missing docker-compose
* Update cli/config/config.go
* chore: add back traces when extracting the files from the box (#946)
* fix: use a more comprehensive initialisation method for configs
   As go init() method is not deterministic, I found that the logger init was
   not called at the right time. With change we ensure that the Init is:
   1) called first
   2) existing it the config was already populated
* chore: add back traces when extracting the files from the box

Signed-off-by: Adam Stokes <[email protected]>
Co-authored-by: Manuel de la Peña <[email protected]>

* Add basic check on correct service is defined for profile runs (#957)

Fixes #944

This adds a length check on the string split for verifying that the
<service/image name>:<tag> is defined when adding additional services to a
profile deployment.

Signed-off-by: Adam Stokes <[email protected]>

* Update NOTICE (#969)

Adds additional overrides to pulling in the proper licenses

Signed-off-by: Adam Stokes <[email protected]>

* Build binaries via goreleaser (#977)

This handles building for all supported architectures including running packr
for embedding the binary files.

This allows us to easily extend our release process for tagging official cli
releases, building in various package formats and publishing to different
package registries

Signed-off-by: Adam Stokes <[email protected]>

* chore: simplify release process on Jenkins (#980)

* chore: archive releases in Jenkins UI

* chore: simplify release process on Jenkins

* chore: remove garbage

* chore: support retrying fetching the goreleaser script

It will also retry in the case the release command fails

* chore: set GITHUB_TOKEN

* chore: ensure workspace is clean in the worker

* chore: add release information for goreleaser

* Remove the agent config file parameters for stand alone (#983)

Signed-off-by: Adam Stokes <[email protected]>

Co-authored-by: Manuel de la Peña <[email protected]>

* fix: run unit tests after refactor (#1067)

* chore: remove unused files after refactor

* chore: run unit tests with new layout

* fix: run unit tests on CI

* chore: include unit tests for the e2e dir

* fix: move unit tests resources for installer tests

* fix: move more test resources for unit tests

* fix: abstract path calculation from OS

Co-authored-by: Adam Stokes <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cli: unable to run profile with attached services
3 participants