Skip to content

auditbeat/metricbeat/packetbeat - verify required glibc version#34943

Merged
andrewkroh merged 6 commits intoelastic:mainfrom
andrewkroh:feature/ab/check-glibc-for-packages
Mar 29, 2023
Merged

auditbeat/metricbeat/packetbeat - verify required glibc version#34943
andrewkroh merged 6 commits intoelastic:mainfrom
andrewkroh:feature/ab/check-glibc-for-packages

Conversation

@andrewkroh
Copy link
Copy Markdown
Member

@andrewkroh andrewkroh commented Mar 27, 2023

What does this PR do?

Check the minimum required glibc on cross-build artifacts. This is a precautionary check to ensure binaries are aligned the current OS support matrix (https://www.elastic.co/support/matrix).

Why is it important?

Prevent unintended support matrix incompatibilities.

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.

How to test this PR locally

cd auditbeat; PLATFORMS="linux/amd64 linux386" mage -v crossBuild

Related Issues

Check the minimum required glibc on cross-build artifacts. This is a precautionary
check to ensure binaries are aligned the current OS support matrix (https://www.elastic.co/support/matrix).
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic Bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Mar 27, 2023
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 27, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @andrewkroh? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

Copy link
Copy Markdown
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

@cmacknz
Copy link
Copy Markdown
Member

cmacknz commented Mar 27, 2023

Any reason not to also do this in the Filebeat and Metricbeat builds?

pkg.go:230:6: func `updateWithDarwinUniversal` is unused (unused)

various: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)

import of package `github.com/pkg/errors` is blocked (gomodguard)
@andrewkroh
Copy link
Copy Markdown
Member Author

Filebeat already has it. I will add it to Metricbeat.

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Mar 27, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-03-28T21:09:59.371+0000

  • Duration: 88 min 56 sec

Test stats 🧪

Test Results
Failed 0
Passed 26086
Skipped 1965
Total 28051

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@andrewkroh
Copy link
Copy Markdown
Member Author

andrewkroh commented Mar 27, 2023

It looks like this has detected a problem with Packetbeat on linux/386. It won't be able to run on Debian 9 (glibc 2.24) (which is listed on the support matrix). There are a bunch of inconsistencies on the support matrix (the test checks that things run on at least centos 7 (glibc 2.17) b/c I think that is our true minimum requirement).

Error: dynamically linked binary "build/golang-crossbuild/packetbeat-linux-386" requires glibc 2.28.0, but maximum allowed glibc is 2.17.0

@andrewkroh andrewkroh changed the title auditbeat/packetbeat - verify required glibc version auditbeat/metricbeat/packetbeat - verify required glibc version Mar 28, 2023
@andrewkroh
Copy link
Copy Markdown
Member Author

I resolution I chose for the x-pack/packetbeat failure was to use the debian9 golang-crossbuild image for the linux/386 build. This produces a binary that requires glibc 2.7.0.

@andrewkroh andrewkroh merged commit d76c646 into elastic:main Mar 29, 2023
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
Check the minimum required glibc on cross-build artifacts. This is a precautionary
check to ensure binaries are aligned the current OS support matrix (https://www.elastic.co/support/matrix).

Relates #34938

* {packetbeat,x-pack/packetbeat}

Use debian9 crossbuild image for linux/386 because the change in elastic/beats##34921 broke support for older operating systems.

* Fix golangci-lint warnings

pkg.go:230:6: func `updateWithDarwinUniversal` is unused (unused)

various: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)

import of package `github.com/pkg/errors` is blocked (gomodguard)
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.

4 participants