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 #20827 to 7.x: [Build] Make mage-linux-amd64 statically compiled. #20837

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

ph
Copy link
Contributor

@ph ph commented Aug 27, 2020

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

When I've upgraded my arch system, they have upgraded the libc library,
that libary is much newer than the library used in the crossbuild
docker images. This made building beats impossible because the
mage-linux-amd64 is compiled dynamically and used in all our docker
build.

This PR make the mage binary to be statically compiled so it doesn't
rely on any installed libraries.

What does this PR do?

Why is it important?

Checklist

  • My code follows the style guidelines of this project
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Run mage package in any beats.

Related issues

Use cases

Screenshots

Logs

* [Build] Make mage-linux-amd64 statically compiled.

When I've upgraded my arch system, they have upgraded the libc library,
that libary is much newer than the library used in the crossbuild
docker images. This made building beats impossible because the
mage-linux-amd64 is compiled dynamically and used in all our docker
build.

This PR make the mage binary to be statically compiled so it doesn't
rely on any installed libraries.

(cherry picked from commit 273ecae)
@ph ph added [zube]: In Review backport Team:Platforms Label for the Integrations - Platforms team Team:Services (Deprecated) Label for the former Integrations-Services team labels Aug 27, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 27, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 27, 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 #20837 opened]

  • Start Time: 2020-08-27T19:44:26.473+0000

  • Duration: 72 min 51 sec

Test stats 🧪

Test Results
Failed 2
Passed 19452
Skipped 1851
Total 21305

Test errors

Expand to view the tests failures

  • Name: Build and Test / Libbeat / Libbeat oss / TestOutputReload – pipeline

    • Age: 1
    • Duration: 64.67
    • Error Details: Failed
  • Name: Build and Test / Libbeat / Libbeat oss / TestOutputReload/network_client – pipeline

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

Steps errors

Expand to view the steps failures

  • Name: Mage build test
    • Description: mage build test

    • Duration: 24 min 51 sec

    • Start Time: 2020-08-27T20:09:12.406+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-08-27T20:55:23.383Z] [Google Cloud Storage Plugin] Downloading: Beats/beats/PR-20837-1/source/source.tgz to local path: /var/lib/jenkins/workspace/Beats_beats_PR-20837/source.tgz
[2020-08-27T20:55:32.664Z] + tar --version
[2020-08-27T20:55:32.982Z] + tar -xpf source.tgz
[2020-08-27T20:55:43.365Z] + rm source.tgz
[2020-08-27T20:55:43.390Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats
[2020-08-27T20:55:43.445Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Lint
[2020-08-27T20:55:43.610Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Winlogbeat-oss
[2020-08-27T20:55:43.774Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-08-27T20:55:43.941Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-08-27T20:55:44.112Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/dockerlogbeat
[2020-08-27T20:55:44.281Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-08-27T20:55:44.448Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Journalbeat
[2020-08-27T20:55:44.615Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-08-27T20:55:44.790Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-08-27T20:55:44.955Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Packetbeat-Linux
[2020-08-27T20:55:45.118Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-08-27T20:55:45.281Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-08-27T20:55:45.453Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-08-27T20:55:45.616Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-08-27T20:55:45.788Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-08-27T20:55:45.950Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-08-27T20:55:46.112Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-08-27T20:55:46.277Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Heartbeat-oss
[2020-08-27T20:55:46.440Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Heartbeat-Windows
[2020-08-27T20:55:46.612Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-08-27T20:55:46.780Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-08-27T20:55:46.949Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-08-27T20:55:47.132Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-08-27T20:55:47.299Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-08-27T20:55:47.460Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Filebeat-Windows
[2020-08-27T20:55:47.626Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Packetbeat-Windows
[2020-08-27T20:55:47.788Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-08-27T20:55:47.971Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Functionbeat-Windows
[2020-08-27T20:55:48.141Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Libbeat-x-pack
[2020-08-27T20:55:48.314Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-08-27T20:55:48.497Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-Windows
[2020-08-27T20:55:48.715Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-08-27T20:55:48.907Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Packetbeat-Mac-OS-X
[2020-08-27T20:55:49.085Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-08-27T20:55:49.263Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-08-27T20:55:49.447Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-08-27T20:55:49.679Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-08-27T20:55:49.976Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-08-27T20:55:50.336Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-08-27T20:55:50.729Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Libbeat-oss
[2020-08-27T20:55:51.018Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-08-27T20:55:51.198Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Filebeat-x-pack
[2020-08-27T20:55:51.369Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Filebeat-oss
[2020-08-27T20:55:51.587Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests
[2020-08-27T20:55:51.771Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-OSS-Python-Integration-tests
[2020-08-27T20:55:51.943Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-08-27T20:55:52.577Z] + cat
[2020-08-27T20:55:52.577Z] + /usr/local/bin/runbld ./runbld-script --job-name elastic+beats+pull-request
[2020-08-27T20:55:52.577Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-08-27T20:55:59.171Z] runbld>>> runbld started
[2020-08-27T20:55:59.171Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-08-27T20:56:01.721Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-08-27T20:56:01.721Z] runbld>>> Matches in the system config:
[2020-08-27T20:56:01.721Z] runbld>>> - Matched ^elastic\+beats
[2020-08-27T20:56:01.721Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-08-27T20:56:03.113Z] runbld>>> Debug logging enabled.
[2020-08-27T20:56:03.113Z] runbld>>> Storing result
[2020-08-27T20:56:03.113Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-08-27T20:56:03.113Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200827205602-0D7ACC50
[2020-08-27T20:56:03.113Z] runbld>>> Adding system facts.
[2020-08-27T20:56:04.506Z] runbld>>> Adding vcs info for the latest commit:  82828c510185087571cbe507e681686434cd3713
[2020-08-27T20:56:04.506Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-08-27T20:56:04.506Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-08-27T20:56:04.506Z] Processing JUnit reports with runbld...
[2020-08-27T20:56:04.506Z] + echo 'Processing JUnit reports with runbld...'
[2020-08-27T20:56:04.769Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-08-27T20:56:04.769Z] runbld>>> DURATION: 52ms
[2020-08-27T20:56:04.769Z] runbld>>> STDOUT: 40 bytes
[2020-08-27T20:56:04.769Z] runbld>>> STDERR: 49 bytes
[2020-08-27T20:56:04.769Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-08-27T20:56:04.769Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-20837
[2020-08-27T20:56:05.713Z] runbld>>> Storing build metadata: 
[2020-08-27T20:56:05.713Z] runbld>>> Adding test report.
[2020-08-27T20:56:05.713Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats
[2020-08-27T20:56:06.287Z] runbld>>> Found 139 test output files
[2020-08-27T20:56:08.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-08-27T20:56:08.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-08-27T20:56:08.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-08-27T20:56:08.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-08-27T20:56:08.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-08-27T20:56:09.102Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-08-27T20:56:09.102Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20837/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-08-27T20:56:09.364Z] runbld>>> Test output logs contained: Errors: 0 Failures: 2 Tests: 21154 Skipped: 1570
[2020-08-27T20:56:09.626Z] runbld>>> Storing result
[2020-08-27T20:56:09.626Z] runbld>>> FAILURES: 2
[2020-08-27T20:56:10.199Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-08-27T20:56:10.199Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200827205602-0D7ACC50
[2020-08-27T20:56:10.460Z] runbld>>> Email notification disabled by environment variable.
[2020-08-27T20:56:10.460Z] runbld>>> Slack notification disabled by environment variable.
[2020-08-27T20:56:15.987Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-20837
[2020-08-27T20:56:16.161Z] [INFO] getVaultSecret: Getting secrets
[2020-08-27T20:56:16.239Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-08-27T20:56:17.296Z] + chmod 755 generate-build-data.sh
[2020-08-27T20:56:17.296Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20837/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20837/runs/1 FAILURE 4310550
[2020-08-27T20:56:17.296Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20837/runs/1/steps/?limit=10000 -o steps-info.json

@ph ph merged commit aa54f5e into elastic:7.x Aug 31, 2020
@zube zube bot removed the [zube]: Done label Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Platforms Label for the Integrations - Platforms team Team:Services (Deprecated) Label for the former Integrations-Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants