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

new(kernel_crawler): rename distro keys to match os-release names. #185

Closed
wants to merge 271 commits into from

Conversation

FedeDP
Copy link
Collaborator

@FedeDP FedeDP commented Oct 19, 2023

This is what we expect in driverkit, dbg-go and test-infra.

This is a BREAKING CHANGE

/cc @maxgio92 @EXONER4TED
/hold for discussion.

gnosek and others added 30 commits September 23, 2021 22:06
Otherwise we can't build the eBPF probe when the kmod is already built.
While we still have some hacks for e.g. choosing linux-modules
when available instead of linux-image, this crawler should be
much more robust than the old html-scraping based one.

Also includes support for PhotonOS and Oracle Linux 6/7/8.

Doesn't support Fedora Atomic and CoreOS, since these two distros
are dead by now.
These are the variants we haven't built before so exclude them
here to avoid an explosion in built probes.
Otherwise we get conflicting package names under different URLs
which made us include e.g. backported kernels (which we explicitly
skip) because they had the same package name as a non-backported
kernel we do want to build.
To unblock the probe builder job which doesn't have sqlite 3.8 installed
Otherwise we just reused whatever probe was lying there
We no longer download many of the linux-image-* packages
so we need the linux-modules-* ones to trigger the build.

This means we'll potentially run some builds twice but
the second one should immediately notice that the probes
are already built and exit.
… linux-headers Makefile format

Linux headers for Debian 11 use a new format for the architectur-specific
Makefile.  Enhance the Makefile relocation patching logic to handle this
new format as well as the old one.
… support CustomDebian operation

- Install libelf-dev in Debian dockerfiles
- Fix linux-kbuild finder logic to accomodate package location in CustomDebian mode
[SSPROD-9627] Enhance build-probe-binaries Debian logic to handle new linux-headers Makefile format
[SSPROD-9627] Fix README.md to document use of CustomDebian option
… to sysdig-probe-loader

Allows user to specify the full URL, including host, directory, AND filename,
to be used by sysdig-probe-loader in naming and retrieving a kernel module
or eBPF probe.

Useful if
- Kernel config file is not available on host - normally needed to calculate hash value
  component of probe filename
- Probe is to be downloaded from locally-hosted system, and the user is unable
  or unwilling to obey the Sysdig naming/directory hierarchy conventions
[SSPROD-9709] Add SYSDIG_PROBE_OVERRIDE_FULL_URL environment variable to sysdig-probe-loader
The eBPF probe builds successfully with clang 13 but then fails
the verifier test upon loading.
Fedora 34 and 35 have the same gcc version (at least at this point
in time) but are otherwise incompatible:
- fc34 can't build probes for fc35 kernels because fc35 needs a newer glibc
- fc35 can't build eBPF probes (at all) because its clang is too new

1. Try to parse the kernel version to look for distro-specific tags.
If one is found, look for a matching dockerfile. If there is one, use it.
Otherwise, fall back to gcc version based choice.

2. Add a fc34 builder
add a non-busybox sed to the container used to call
the top-level script build-probe-binaries

This is necessary to patch the Makefiles used when
building debian probes.
When defining the environment variable SYSDIG_FORCE_DOWNLOAD_PROBE,
the probe loader skips the building phase and tries to directly download the probe.
EXONER4TED and others added 15 commits June 23, 2023 16:50
Signed-off-by: Federico Di Pierro <[email protected]>
Instead, directly deploy pages using `update-kernels` github action.

Signed-off-by: Federico Di Pierro <[email protected]>

Co-authored-by: Massimiliano Giovagnoli <[email protected]>
Signed-off-by: Federico Di Pierro <[email protected]>
Signed-off-by: Federico Di Pierro <[email protected]>
This is what we expect in driverkit, dbg-go and test-infra.

Signed-off-by: Federico Di Pierro <[email protected]>
@maxgio92
Copy link
Member

As the names would be the official ones that can be also checked in os-release it's both useful and correct to remove this responsibility from the kernel-crawler.

Where needed a data manipulation, I think it would be better it it was a dedicated component in a customized pipeline.

@maxgio92
Copy link
Member

/lgtm

@FedeDP
Copy link
Collaborator Author

FedeDP commented Oct 23, 2023

/close
I force pushed main in order to fix falcosecurity/test-infra#1118 and now got too many conflicts on this one :)

@poiana
Copy link
Contributor

poiana commented Oct 23, 2023

@FedeDP: Closed this PR.

In response to this:

/close
I force pushed main in order to fix falcosecurity/test-infra#1118 and now got too many conflicts on this one :)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@poiana poiana closed this Oct 23, 2023
@FedeDP FedeDP deleted the new/rename_keys_to_osrelease branch October 23, 2023 13:50
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.