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

pkg/driver/flatcar: Update the script #425

Merged
merged 1 commit into from Feb 7, 2024

Conversation

krnowak
Copy link
Contributor

@krnowak krnowak commented Feb 7, 2024

What type of PR is this?

/kind bug
/kind cleanup

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area library

What this PR does / why we need it:

Fixes building kernel module on Flatcar. The bash script that was relocating the kernel tools had some issues.

It was taken straight from the old driver loader bash script, but now it's a separate script, so some constructs like local make no sense there. A result was that no kernel tools were patched, thus they could fail to run if they were built against a newer glibc than the one provided by the falco-driver-loader image.

Also print the output of the script unconditionally, so we may have some idea about what's going on here.

Special notes for your reviewer:

I hope that hardcoding /host as host root is fine - I can't see it being provided for customization purposes. Using HOST_ROOT env var wouldn't work if it was provided through --host-root flag.

@FedeDP
Copy link
Contributor

FedeDP commented Feb 7, 2024

/milestone v0.8.0
Thanks for this PR and fix!

I hope that hardcoding /host as host root is fine - I can't see it being provided for customization purposes. Using HOST_ROOT env var wouldn't work if it was provided through --host-root flag.

I'd say that's ok since this is what was already done by the old falco-driver-loader bash script!
Were you already able to test this on flatcar?

@poiana poiana added this to the v0.8.0 milestone Feb 7, 2024
pkg/driver/distro/flatcar.go Outdated Show resolved Hide resolved
@krnowak
Copy link
Contributor Author

krnowak commented Feb 7, 2024

/milestone v0.8.0 Thanks for this PR and fix!

I hope that hardcoding /host as host root is fine - I can't see it being provided for customization purposes. Using HOST_ROOT env var wouldn't work if it was provided through --host-root flag.

I'd say that's ok since this is what was already done by the old falco-driver-loader bash script! Were you already able to test this on flatcar?

Yeah, tested it on image with glibc 2.38 and it worked - lsmod listed the falco module.

It was taken straight from the old driver loader bash script, but now
it's a separate script, so some constructs like `local` make no sense
there. A result was that no kernel tools were patched, thus they could
fail to run if they were built against a newer glibc than the one
provided by the falco-driver-loader image.

Also print both standard output and standard error on failure, so we
may have some idea about what's going on here.

Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Feb 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, krnowak

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana
Copy link
Contributor

poiana commented Feb 7, 2024

LGTM label has been added.

Git tree hash: f2e9585ebc3ebbc547343fb07f24f0512bf5b95e

@poiana poiana added the approved label Feb 7, 2024
@poiana poiana merged commit 95104b1 into falcosecurity:main Feb 7, 2024
14 checks passed
@krnowak krnowak deleted the krnowak/flatcar-fixes branch February 7, 2024 17:08
@FedeDP
Copy link
Contributor

FedeDP commented Feb 8, 2024

/milestone v0.7.2

@poiana poiana modified the milestones: v0.8.0, v0.7.2 Feb 8, 2024
@FedeDP FedeDP mentioned this pull request Feb 9, 2024
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.

None yet

3 participants