Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #21042 to 7.x: [Elastic Agent] Add fleet.host.id for sending to endpoint. #21077

Merged
merged 1 commit into from
Sep 15, 2020

Conversation

blakerouse
Copy link
Contributor

Cherry-pick of PR #21042 to 7.x branch. Original message:

What does this PR do?

Adds host.id to fleet, resulting in fleet.host.id being send to Elastic Endpoint Security.

Why is it important?

This ensures that Elastic Endpoint Security uses the same host.id in events that all the beats and elastic-agent uses.

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 added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

…1042)

* Add fleet.host.id for sending to endpoint.

* Add changelog entry.

(cherry picked from commit b67442e)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 14, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 14, 2020
@blakerouse blakerouse self-assigned this Sep 14, 2020
@elasticmachine
Copy link
Collaborator

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #21077 opened]

  • Start Time: 2020-09-14T14:06:55.364+0000

  • Duration: 72 min 5 sec

Test stats 🧪

Test Results
Failed 6
Passed 2055
Skipped 6
Total 2067

Test errors

Expand to view the tests failures

  • Name: Build and Test / Elastic Agent Mac OS X / TestFleetGateway – application

    • Age: 1
    • Duration: 0
    • Error Details: Failed
  • Name: Build and Test / Elastic Agent Mac OS X / TestFleetGateway/send_no_event_and_receive_no_action – application

    • Age: 1
    • Duration: 0
    • Error Details: Failed
  • Name: Build and Test / Elastic Agent Mac OS X / TestFleetGateway/Successfully_connects_and_receives_a_series_of_actions – application

    • Age: 1
    • Duration: 0
    • Error Details: Failed
  • Name: Build and Test / Elastic Agent Mac OS X / TestFleetGateway/Periodically_communicates_with_Fleet – application

    • Age: 1
    • Duration: 0
    • Error Details: Failed
  • Name: Build and Test / Elastic Agent Mac OS X / TestFleetGateway/send_event_and_receive_no_action – application

    • Age: 1
    • Duration: 0
    • Error Details: Failed
  • Name: Build and Test / Elastic Agent Mac OS X / TestFleetGateway/Test_the_wait_loop_is_interruptible – application

    • Age: 1
    • Duration: 0
    • Error Details: Failed

Steps errors

Expand to view the steps failures

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Duration: 13 min 10 sec

    • Start Time: 2020-09-14T15:04:01.241+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 1

    • Duration: 1 min 35 sec

    • Start Time: 2020-09-14T15:17:25.334+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-09-14T15:17:10.931Z]   JUnit Report:    /private/var/lib/jenkins/workspace/Beats_beats_PR-21077/src/github.com/elastic/beats/x-pack/elastic-agent/build/TEST-go-unit.xml
[2020-09-14T15:17:10.932Z]   Output File:     /private/var/lib/jenkins/workspace/Beats_beats_PR-21077/src/github.com/elastic/beats/x-pack/elastic-agent/build/TEST-go-unit.out
[2020-09-14T15:17:10.932Z] >> go test: Unit Test Failed
[2020-09-14T15:17:10.932Z] Error: go test failed: 6 test failures
[2020-09-14T15:17:12.703Z] Docker machine "default" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
[2020-09-14T15:17:12.703Z] Docker machine "default" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
[2020-09-14T15:17:13.701Z] Client:
[2020-09-14T15:17:13.701Z]  Version:      18.03.1-ce
[2020-09-14T15:17:13.701Z]  API version:  1.37
[2020-09-14T15:17:13.701Z]  Go version:   go1.9.5
[2020-09-14T15:17:13.701Z]  Git commit:   9ee9f40
[2020-09-14T15:17:13.701Z]  Built:        Thu Apr 26 07:13:02 2018
[2020-09-14T15:17:13.701Z]  OS/Arch:      darwin/amd64
[2020-09-14T15:17:13.701Z]  Experimental: false
[2020-09-14T15:17:13.701Z]  Orchestrator: swarm
[2020-09-14T15:17:13.701Z] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[2020-09-14T15:17:13.701Z] It requires Docker daemon to be installed and running
[2020-09-14T15:17:14.715Z] + python .ci/scripts/pre_archive_test.py
[2020-09-14T15:17:18.536Z] Copy ./x-pack/elastic-agent/build into build/x-pack/elastic-agent/build
[2020-09-14T15:17:18.718Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21077/src/github.com/elastic/beats/build
[2020-09-14T15:17:18.828Z] Recording test results
[2020-09-14T15:17:19.200Z] Stashed 1 file(s)
[2020-09-14T15:17:19.274Z] Archiving artifacts
[2020-09-14T15:17:20.369Z] + python .ci/scripts/search_system_tests.py
[2020-09-14T15:17:20.638Z] [INFO] system-tests=''. If no empty then let's create a tarball
[2020-09-14T15:17:22.136Z] Post stage
[2020-09-14T15:17:22.154Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21077/src/github.com/elastic/beats
[2020-09-14T15:17:23.097Z] Starting "default"...
[2020-09-14T15:17:24.095Z] Machine "default" is already running.
[2020-09-14T15:17:24.567Z] Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100:2376: getsockopt: connection refused
[2020-09-14T15:17:24.567Z] You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
[2020-09-14T15:17:24.567Z] Be advised that this will trigger a Docker daemon restart which might stop running containers.
[2020-09-14T15:17:24.567Z] 
[2020-09-14T15:17:25.068Z] Client:
[2020-09-14T15:17:25.068Z]  Version:      18.03.1-ce
[2020-09-14T15:17:25.068Z]  API version:  1.37
[2020-09-14T15:17:25.068Z]  Go version:   go1.9.5
[2020-09-14T15:17:25.068Z]  Git commit:   9ee9f40
[2020-09-14T15:17:25.068Z]  Built:        Thu Apr 26 07:13:02 2018
[2020-09-14T15:17:25.068Z]  OS/Arch:      darwin/amd64
[2020-09-14T15:17:25.068Z]  Experimental: false
[2020-09-14T15:17:25.068Z]  Orchestrator: swarm
[2020-09-14T15:17:25.068Z] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[2020-09-14T15:17:25.068Z] It requires Docker daemon to be installed and running
[2020-09-14T15:18:00.628Z] Failed in branch Elastic Agent Mac OS X
[2020-09-14T15:18:10.541Z] [INFO] unstashV2: JOB_GCS_BUCKET is set. bucket param got precedency instead.
[2020-09-14T15:18:10.582Z] [INFO] unstashV2: JOB_GCS_CREDENTIALS is set. credentialsId param got precedency instead.
[2020-09-14T15:18:10.656Z] [Google Cloud Storage Plugin] Found 1 files to download from pattern: gs://beats-ci-temp/Beats/beats/PR-21077-1/source/source.tgz
[2020-09-14T15:18:10.796Z] [Google Cloud Storage Plugin] Downloading: Beats/beats/PR-21077-1/source/source.tgz to local path: /var/lib/jenkins/workspace/Beats_beats_PR-21077/source.tgz
[2020-09-14T15:18:27.801Z] + tar --version
[2020-09-14T15:18:28.131Z] + tar -xpf source.tgz
[2020-09-14T15:18:38.485Z] + rm source.tgz
[2020-09-14T15:18:38.509Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21077/src/github.com/elastic/beats
[2020-09-14T15:18:38.559Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21077/src/github.com/elastic/beats/Lint
[2020-09-14T15:18:38.753Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21077/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-09-14T15:18:38.932Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21077/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-09-14T15:18:39.095Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21077/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-09-14T15:18:39.646Z] + cat
[2020-09-14T15:18:39.646Z] + /usr/local/bin/runbld ./runbld-script --job-name elastic+beats+pull-request
[2020-09-14T15:18:39.646Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-09-14T15:18:46.247Z] runbld>>> runbld started
[2020-09-14T15:18:46.247Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-09-14T15:18:47.192Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-09-14T15:18:47.192Z] runbld>>> Matches in the system config:
[2020-09-14T15:18:47.192Z] runbld>>> - Matched ^elastic\+beats
[2020-09-14T15:18:47.192Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-09-14T15:18:48.573Z] runbld>>> Debug logging enabled.
[2020-09-14T15:18:48.573Z] runbld>>> Storing result
[2020-09-14T15:18:48.573Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-09-14T15:18:48.573Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200914151848-76A3A0D6
[2020-09-14T15:18:48.573Z] runbld>>> Adding system facts.
[2020-09-14T15:18:49.515Z] runbld>>> Adding vcs info for the latest commit:  d58460d176dd5813220d49422cb0a5c7aa96056d
[2020-09-14T15:18:49.515Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-09-14T15:18:49.515Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-09-14T15:18:49.515Z] Processing JUnit reports with runbld...
[2020-09-14T15:18:49.515Z] + echo 'Processing JUnit reports with runbld...'
[2020-09-14T15:18:49.777Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-09-14T15:18:49.777Z] runbld>>> DURATION: 33ms
[2020-09-14T15:18:49.777Z] runbld>>> STDOUT: 40 bytes
[2020-09-14T15:18:49.777Z] runbld>>> STDERR: 49 bytes
[2020-09-14T15:18:49.777Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-09-14T15:18:49.777Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-21077
[2020-09-14T15:18:50.720Z] runbld>>> Storing build metadata: 
[2020-09-14T15:18:50.720Z] runbld>>> Adding test report.
[2020-09-14T15:18:50.720Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-21077/src/github.com/elastic/beats
[2020-09-14T15:18:51.666Z] runbld>>> Found 3 test output files
[2020-09-14T15:18:52.239Z] runbld>>> Test output logs contained: Errors: 0 Failures: 6 Tests: 2067 Skipped: 0
[2020-09-14T15:18:52.501Z] runbld>>> Storing result
[2020-09-14T15:18:52.501Z] runbld>>> FAILURES: 6
[2020-09-14T15:18:53.974Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-09-14T15:18:53.974Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200914151848-76A3A0D6
[2020-09-14T15:18:53.974Z] runbld>>> Email notification disabled by environment variable.
[2020-09-14T15:18:53.974Z] runbld>>> Slack notification disabled by environment variable.
[2020-09-14T15:18:59.477Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-21077
[2020-09-14T15:18:59.656Z] [INFO] getVaultSecret: Getting secrets
[2020-09-14T15:18:59.755Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-09-14T15:19:00.865Z] + chmod 755 generate-build-data.sh
[2020-09-14T15:19:00.865Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21077/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21077/runs/1 FAILURE 4325230
[2020-09-14T15:19:00.865Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21077/runs/1/steps/?limit=10000 -o steps-info.json
[2020-09-14T15:19:01.776Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21077/runs/1/tests/?status=FAILED -o tests-errors.json

Copy link
Contributor

@michalpristas michalpristas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backport looks ok

@blakerouse blakerouse merged commit dd64586 into elastic:7.x Sep 15, 2020
@blakerouse blakerouse deleted the backport_21042_7.x branch September 15, 2020 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants