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

[Agent] Fix installers (#17077) #18299

Merged
merged 2 commits into from
May 6, 2020

Conversation

michalpristas
Copy link
Contributor

What does this PR do?

This PR changes installers in two ways

SNAPSHOT handling

for now turned on by default, if we want to enable it only for snapshot agent we need to modify build to set flag at build time and then enable snapshot installer afterwards

windows refactor

install step on windows was not working properly, while we were unzipping we were creating one additional directory layer, this is now removed.

Small config change

Default configs are not using 9300 endpoint for ES from now on

Why is it important?

To simplify use case when running from snapshot and entire windows flow

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

How to test this PR locally

Scenario 1

run SNAPSHOT=true mage package to build snapshot package
unpack it somewhere locally and try if it runs with no changes to config

Scenario 2

Same as 1 but on windows, windows was broken even for non SNAPSHOT packages.

[Agent] Fix installers for snapshots (elastic#17077)
@michalpristas michalpristas added backport elastic-agent Ingest Management:alpha1 Group issues for ingest management alpha1 labels May 6, 2020
@michalpristas michalpristas self-assigned this May 6, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 6, 2020
@elasticmachine
Copy link
Collaborator

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

@ruflin ruflin requested a review from ph May 6, 2020 11:53
@elasticmachine
Copy link
Collaborator

elasticmachine commented May 6, 2020

💔 Build Failed

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 5212
Skipped 898
Total 6110

Steps errors

Expand to view the steps failures

  • Name: Mage update build test

    • Description: mage update build test

    • Result: FAILURE

    • Duration: 7 min 8 sec<

    • Start Time: 2020-05-06T16:09:34.525+0000

  • Name: Report to Codecov

    • Description: curl -sSLo codecov https://codecov.io/bash for i in auditbeat filebeat heartbeat libbeat metricbeat packetbeat winlogbeat journalbeat do FILE="${i}/build/coverage/full.cov" if [ -f "${FILE}" ]; then bash codecov -f "${FILE}" fi done

    • Result: FAILURE

    • Duration: 2 min 22 sec<

    • Start Time: 2020-05-06T16:13:08.227+0000

Log output

Expand to view the last 100 lines of log output

[2020-05-06T16:59:40.799Z] + FILE=auditbeat/build/coverage/full.cov
[2020-05-06T16:59:40.799Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-05-06T16:59:40.799Z] + FILE=filebeat/build/coverage/full.cov
[2020-05-06T16:59:40.799Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-05-06T16:59:40.799Z] + FILE=heartbeat/build/coverage/full.cov
[2020-05-06T16:59:40.799Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-05-06T16:59:40.799Z] + FILE=libbeat/build/coverage/full.cov
[2020-05-06T16:59:40.799Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-05-06T16:59:40.800Z] + FILE=metricbeat/build/coverage/full.cov
[2020-05-06T16:59:40.800Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-05-06T16:59:40.800Z] + FILE=packetbeat/build/coverage/full.cov
[2020-05-06T16:59:40.800Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-06T16:59:40.800Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-06T16:59:40.800Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-06T16:59:40.800Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-06T16:59:40.800Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-06T16:59:42.047Z] Stage "Generators Metricbeat Mac OS X" skipped due to when conditional
[2020-05-06T16:59:42.158Z] Stage "Generators Beat Mac OS X" skipped due to when conditional
[2020-05-06T16:59:42.522Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats
[2020-05-06T16:59:42.845Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-05-06T16:59:42.862Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Lint
[2020-05-06T16:59:42.965Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Winlogbeat-oss
[2020-05-06T16:59:43.080Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-05-06T16:59:43.207Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Journalbeat-oss
[2020-05-06T16:59:43.331Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Dockerlogbeat
[2020-05-06T16:59:43.455Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-05-06T16:59:43.617Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-05-06T16:59:43.790Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-05-06T16:59:43.976Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Filebeat-x-pack
[2020-05-06T16:59:44.176Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-05-06T16:59:44.328Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Heartbeat-oss
[2020-05-06T16:59:44.440Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-05-06T16:59:44.564Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Libbeat-x-pack
[2020-05-06T16:59:44.678Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-05-06T16:59:44.785Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-05-06T16:59:44.889Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Filebeat-Windows
[2020-05-06T16:59:44.997Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Auditbeat-Linux
[2020-05-06T16:59:45.105Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Packetbeat-oss
[2020-05-06T16:59:45.227Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-05-06T16:59:45.348Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-Windows
[2020-05-06T16:59:45.459Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-05-06T16:59:45.588Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Heartbeat-Windows
[2020-05-06T16:59:45.709Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Functionbeat-Windows
[2020-05-06T16:59:45.819Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Libbeat-oss
[2020-05-06T16:59:45.935Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Filebeat-oss
[2020-05-06T16:59:46.056Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-05-06T16:59:46.186Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-05-06T16:59:46.321Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-05-06T16:59:46.446Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-05-06T16:59:46.582Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Auditbeat-Windows
[2020-05-06T16:59:46.708Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-05-06T16:59:46.834Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-05-06T16:59:47.224Z] + cat
[2020-05-06T16:59:47.224Z] + /usr/local/bin/runbld ./runbld-script
[2020-05-06T16:59:47.224Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-05-06T16:59:53.840Z] runbld>>> runbld started
[2020-05-06T16:59:53.840Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-05-06T16:59:55.238Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-18299' in order of occurrence in the config (last value wins).
[2020-05-06T16:59:56.184Z] runbld>>> Debug logging enabled.
[2020-05-06T16:59:56.445Z] runbld>>> Storing result
[2020-05-06T16:59:56.445Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-05-06T16:59:56.445Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200506165956-2B2C188F
[2020-05-06T16:59:56.445Z] runbld>>> Adding system facts.
[2020-05-06T16:59:57.396Z] runbld>>> Adding vcs info for the latest commit:  ca13e195f98aeeda8b530b6302bebd5d1f54db66
[2020-05-06T16:59:57.658Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-05-06T16:59:57.658Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-05-06T16:59:57.658Z] + echo 'Processing JUnit reports with runbld...'
[2020-05-06T16:59:57.658Z] Processing JUnit reports with runbld...
[2020-05-06T16:59:57.937Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-05-06T16:59:57.937Z] runbld>>> DURATION: 14ms
[2020-05-06T16:59:57.937Z] runbld>>> STDOUT: 40 bytes
[2020-05-06T16:59:57.937Z] runbld>>> STDERR: 49 bytes
[2020-05-06T16:59:57.937Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-05-06T16:59:57.937Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats
[2020-05-06T16:59:59.338Z] runbld>>> Storing build metadata: 
[2020-05-06T16:59:59.338Z] runbld>>> Adding test report.
[2020-05-06T16:59:59.338Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats
[2020-05-06T17:00:00.736Z] runbld>>> Found 91 test output files
[2020-05-06T17:00:00.736Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-05-06T17:00:00.736Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-05-06T17:00:01.002Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-05-06T17:00:01.002Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-05-06T17:00:01.002Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-05-06T17:00:01.002Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-05-06T17:00:01.266Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-05-06T17:00:01.529Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-05-06T17:00:01.790Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 5960 Skipped: 708
[2020-05-06T17:00:01.790Z] runbld>>> Storing result
[2020-05-06T17:00:01.790Z] runbld>>> FAILURES: 0
[2020-05-06T17:00:02.063Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-05-06T17:00:02.063Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200506165956-2B2C188F
[2020-05-06T17:00:02.063Z] runbld>>> Email notification disabled by environment variable.
[2020-05-06T17:00:02.063Z] runbld>>> Slack notification disabled by environment variable.
[2020-05-06T17:00:07.781Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18299
[2020-05-06T17:00:07.957Z] [INFO] getVaultSecret: Getting secrets
[2020-05-06T17:00:08.078Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-05-06T17:00:09.177Z] + chmod 755 generate-build-data.sh
[2020-05-06T17:00:09.177Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18299/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18299/runs/5 FAILURE 6131304
[2020-05-06T17:00:09.728Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18299/runs/5/steps/?limit=10000 -o steps-info.json
[2020-05-06T17:00:10.639Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18299/runs/5/tests/?status=FAILED -o tests-errors.json

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 5881
Skipped 899
Total 6780

@michalpristas michalpristas merged commit 8c06bd1 into elastic:7.x May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Ingest Management:alpha1 Group issues for ingest management alpha1 needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants