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

fix(kernel_crawler): fixed bottlerocket crawler. #199

Merged
merged 1 commit into from
May 22, 2024
Merged

Conversation

FedeDP
Copy link
Collaborator

@FedeDP FedeDP commented May 22, 2024

What type of PR is this?

/kind bug

Any specific area of the project related to this PR?

/area crawler

What this PR does / why we need it:

As reported here: https://kubernetes.slack.com/archives/CMWH3EH32/p1716319428261609.
Latest bottlerocket release (1.20.0) broke our crawler because of: bottlerocket-os/bottlerocket#3897, bottlerocket-os/bottlerocket#3932, bottlerocket-os/bottlerocket#3905.
Basically, we expected flavored kernel configuration but they now only use a common one.
Adjusted the code to deal with this in a backward compatible manner.
Also, the 1.20.0 kernel config will still be emitted with the 1_1.20.0-$flavor kernel version string, so that we keep backward compatibility with existing driver loader logic (and we don't need to touch it neither); this means that as soon as this PR is merged and we start build drivers for the new bottlerocket, existing Falco will be able to download the new drivers.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@@ -90,52 +90,74 @@ def get_package_tree(self, version=''):
self.checkout_version(v)

# Find supported kernels dynamically
supported_kernel_specs = self.match_file("kernel-.*.spec", False)
supported_kernel_specs = self.match_file("kernel-.*.spec", True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fetch the full path to kernel specs, so that we can use their dirname as working dir when looking up for config file and supported flavors.
This is a fix.

@FedeDP
Copy link
Collaborator Author

FedeDP commented May 22, 2024

/hold
testing the fix.

@FedeDP
Copy link
Collaborator Author

FedeDP commented May 22, 2024

/unhold

@poiana poiana added the lgtm label May 22, 2024
@poiana poiana merged commit 676bfa0 into main May 22, 2024
5 checks passed
@poiana poiana deleted the fix/bottlerocket branch May 22, 2024 10:45
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.

3 participants