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) #18303

Merged
merged 4 commits into from
May 7, 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 self-assigned this May 6, 2020
@elasticmachine
Copy link
Collaborator

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

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 6, 2020
@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 5772
Skipped 894
Total 6666

Steps errors

Expand to view the steps failures

  • Name: Make -C libbeat testsuite
    • Description: make -C libbeat testsuite

    • Result: FAILURE

    • Duration: 25 min 41 sec<

    • Start Time: 2020-05-07T15:50:12.471+0000

Log output

Expand to view the last 100 lines of log output

[2020-05-07T16:43:55.314Z] ++ find x-pack/metricbeat -name terraform.tfstate
[2020-05-07T16:43:55.314Z] + exit 0
[2020-05-07T16:43:55.668Z] + curl -sSLo codecov https://codecov.io/bash
[2020-05-07T16:43:55.931Z] + FILE=auditbeat/build/coverage/full.cov
[2020-05-07T16:43:55.931Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-05-07T16:43:55.931Z] + FILE=filebeat/build/coverage/full.cov
[2020-05-07T16:43:55.931Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-05-07T16:43:55.931Z] + FILE=heartbeat/build/coverage/full.cov
[2020-05-07T16:43:55.931Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-05-07T16:43:55.931Z] + FILE=libbeat/build/coverage/full.cov
[2020-05-07T16:43:55.931Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-05-07T16:43:55.931Z] + FILE=metricbeat/build/coverage/full.cov
[2020-05-07T16:43:55.931Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-05-07T16:43:55.931Z] + FILE=packetbeat/build/coverage/full.cov
[2020-05-07T16:43:55.931Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-07T16:43:55.931Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-07T16:43:55.931Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-07T16:43:55.931Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-07T16:43:55.931Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-07T16:43:56.323Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats
[2020-05-07T16:43:56.632Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-05-07T16:43:56.644Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Lint
[2020-05-07T16:43:56.712Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Winlogbeat-oss
[2020-05-07T16:43:56.778Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-05-07T16:43:56.837Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Dockerlogbeat
[2020-05-07T16:43:56.907Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Journalbeat-oss
[2020-05-07T16:43:56.965Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-05-07T16:43:57.025Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-05-07T16:43:57.091Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-05-07T16:43:57.153Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-05-07T16:43:57.213Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-05-07T16:43:57.275Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Heartbeat-oss
[2020-05-07T16:43:57.339Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-05-07T16:43:57.402Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-05-07T16:43:57.463Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Filebeat-Windows
[2020-05-07T16:43:57.538Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Libbeat-x-pack
[2020-05-07T16:43:57.599Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Auditbeat-Linux
[2020-05-07T16:43:57.658Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Packetbeat-oss
[2020-05-07T16:43:57.717Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-Windows
[2020-05-07T16:43:57.788Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-05-07T16:43:57.845Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-05-07T16:43:57.901Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Filebeat-x-pack
[2020-05-07T16:43:57.955Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-05-07T16:43:58.014Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Functionbeat-Windows
[2020-05-07T16:43:58.076Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Heartbeat-Windows
[2020-05-07T16:43:58.135Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Libbeat-oss
[2020-05-07T16:43:58.190Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Filebeat-oss
[2020-05-07T16:43:58.253Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Auditbeat-Windows
[2020-05-07T16:43:58.310Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-05-07T16:43:58.367Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-05-07T16:43:58.428Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-05-07T16:43:58.765Z] + cat
[2020-05-07T16:43:58.765Z] + /usr/local/bin/runbld ./runbld-script
[2020-05-07T16:43:58.765Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-05-07T16:44:05.378Z] runbld>>> runbld started
[2020-05-07T16:44:05.378Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-05-07T16:44:07.291Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-18303' in order of occurrence in the config (last value wins).
[2020-05-07T16:44:08.673Z] runbld>>> Debug logging enabled.
[2020-05-07T16:44:08.673Z] runbld>>> Storing result
[2020-05-07T16:44:08.673Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-05-07T16:44:08.673Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200507164408-F16DE814
[2020-05-07T16:44:08.673Z] runbld>>> Adding system facts.
[2020-05-07T16:44:09.615Z] runbld>>> Adding vcs info for the latest commit:  99eeabfaaf5b76d5e77d5d3a0dcc97aa0bcf073a
[2020-05-07T16:44:09.615Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-05-07T16:44:09.615Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-05-07T16:44:09.615Z] + echo 'Processing JUnit reports with runbld...'
[2020-05-07T16:44:09.615Z] Processing JUnit reports with runbld...
[2020-05-07T16:44:10.186Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-05-07T16:44:10.186Z] runbld>>> DURATION: 13ms
[2020-05-07T16:44:10.186Z] runbld>>> STDOUT: 40 bytes
[2020-05-07T16:44:10.186Z] runbld>>> STDERR: 49 bytes
[2020-05-07T16:44:10.186Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-05-07T16:44:10.186Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats
[2020-05-07T16:44:11.569Z] runbld>>> Storing build metadata: 
[2020-05-07T16:44:11.569Z] runbld>>> Adding test report.
[2020-05-07T16:44:11.569Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats
[2020-05-07T16:44:12.511Z] runbld>>> Found 92 test output files
[2020-05-07T16:44:13.084Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-05-07T16:44:13.084Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-05-07T16:44:13.084Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-05-07T16:44:13.084Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-05-07T16:44:13.084Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-05-07T16:44:13.084Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-05-07T16:44:14.031Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-05-07T16:44:14.031Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-05-07T16:44:14.292Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 6516 Skipped: 703
[2020-05-07T16:44:14.552Z] runbld>>> Storing result
[2020-05-07T16:44:14.552Z] runbld>>> FAILURES: 0
[2020-05-07T16:44:14.813Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-05-07T16:44:14.813Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200507164408-F16DE814
[2020-05-07T16:44:14.813Z] runbld>>> Email notification disabled by environment variable.
[2020-05-07T16:44:14.813Z] runbld>>> Slack notification disabled by environment variable.
[2020-05-07T16:44:20.741Z] Running on worker-395930 in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18303
[2020-05-07T16:44:20.816Z] [INFO] getVaultSecret: Getting secrets
[2020-05-07T16:44:20.872Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-05-07T16:44:22.800Z] + chmod 755 generate-build-data.sh
[2020-05-07T16:44:22.800Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18303/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18303/runs/9 FAILURE 5004001
[2020-05-07T16:44:22.800Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18303/runs/9/steps/?limit=10000 -o steps-info.json
[2020-05-07T16:44:24.253Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18303/runs/9/tests/?status=FAILED -o tests-errors.json
[2020-05-07T16:44:24.959Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18303/runs/9/log/ -o pipeline-log.txt

@michalpristas
Copy link
Contributor Author

dashboard failures on libbeat - not related, merging

@michalpristas michalpristas merged commit 60a51c8 into elastic:7.8 May 7, 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 review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants