Skip to content

wip: new(cmd/driver): download compatible driver version if requested#569

Open
FedeDP wants to merge 3 commits intomainfrom
new/driver_download_compatible
Open

wip: new(cmd/driver): download compatible driver version if requested#569
FedeDP wants to merge 3 commits intomainfrom
new/driver_download_compatible

Conversation

@FedeDP
Copy link
Copy Markdown
Contributor

@FedeDP FedeDP commented May 31, 2024

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area cli

What this PR does / why we need it:

This small patch allows to download compatible driver versions instead of the currently configured one.
This is how it works:

  • you have falco 0.37.1 installed that ships with driver 7.0.0+driver
  • you run falcoctl driver install --compatible
  • it lists prefixes on our s3 bucket under the driver/ prefix (https://download.falco.org/driver/)
  • loads all semver-like driver versions
  • fetches the newest compatible one (where compatible in this context means same major version)
  • this means that for Falco 0.37.1 it would download driver 7.2.0+driver.

Now, we cannot do the same for the compilation because we have only local sources for the driver installed Falco was shipped with, but that's not a big deal for now. We could have a post-submit job triggered whenever a new driver version is added (https://github.com/falcosecurity/test-infra/tree/master/driverkit/config) that push driver sources configured for Falco under eg: https://download.falco.org/driver/$version/src/.

Disabled by default for now.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Keeping it as wip until we decide what to do for compilation too.

FedeDP added 2 commits May 27, 2024 14:38
…er version while downloading drivers.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Also, skip it entirely when running on development driver versions.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@poiana
Copy link
Copy Markdown
Contributor

poiana commented May 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP

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

The pull request process is described here

Details 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

@FedeDP
Copy link
Copy Markdown
Contributor Author

FedeDP commented May 31, 2024

Example output:

sudo ./falcoctl driver install --compatible --type kmod --log-level debug --version 7.0.0+driver
[sudo] password di federico: 
2024-05-31 11:37:02 DEBUG Fetched kernel info
                      ├ arch: x86_64
                      ├ kernel release: 6.8.0-31-generic
                      └ kernel version: #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024
2024-05-31 11:37:02 DEBUG Discovered distro target: ubuntu-generic
2024-05-31 11:37:02 DEBUG Detected supported driver type: kmod
2024-05-31 11:37:02 INFO  Running falcoctl driver install
                      ├ driver version: 7.0.0+driver
                      ├ driver type: kmod
                      ├ driver name: falco
                      ├ compile: true
                      ├ download: true
                      ├ target: ubuntu-generic
                      ├ arch: x86_64
                      ├ kernel release: 6.8.0-31-generic
                      └ kernel version: #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024
2024-05-31 11:37:02 INFO  Check if kernel module is still loaded.               
2024-05-31 11:37:02 INFO  OK! There is no module loaded. 
2024-05-31 11:37:02 INFO  Check all versions of kernel module in dkms. 
2024-05-31 11:37:02 INFO  OK! There are no module versions in dkms. 
2024-05-31 11:37:02 DEBUG Loading compatible driver version from S3 
2024-05-31 11:37:03 INFO  Using compatible driver version: 7.2.0+driver

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@FedeDP FedeDP force-pushed the new/driver_download_compatible branch from 4ae0a0a to 2013d5e Compare May 31, 2024 09:42
@poiana
Copy link
Copy Markdown
Contributor

poiana commented Aug 29, 2024

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@FedeDP
Copy link
Copy Markdown
Contributor Author

FedeDP commented Aug 29, 2024

/remove-lifecycle stale

@poiana
Copy link
Copy Markdown
Contributor

poiana commented Nov 27, 2024

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@FedeDP
Copy link
Copy Markdown
Contributor Author

FedeDP commented Nov 27, 2024

/remove-lifecycle stale

@leogr leogr added this to the v0.12.0 milestone Feb 13, 2025
@leogr
Copy link
Copy Markdown
Member

leogr commented Feb 17, 2025

/remove-lifecycle stale

@FedeDP
Copy link
Copy Markdown
Contributor Author

FedeDP commented Feb 17, 2025

Given falcosecurity/libs#1283, i'd wait to merge this one until we clear it up (ie: we don't want falcoctl to automatically choose a newer driver that does not work :/ ).

@poiana
Copy link
Copy Markdown
Contributor

poiana commented May 18, 2025

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@FedeDP
Copy link
Copy Markdown
Contributor Author

FedeDP commented May 19, 2025

/remove-lifecycle stale

@poiana
Copy link
Copy Markdown
Contributor

poiana commented Aug 17, 2025

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@FedeDP
Copy link
Copy Markdown
Contributor Author

FedeDP commented Aug 18, 2025

/remove-lifecycle stale

@poiana
Copy link
Copy Markdown
Contributor

poiana commented Nov 16, 2025

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@leogr
Copy link
Copy Markdown
Member

leogr commented Nov 17, 2025

/remove-lifecycle stale

@leogr leogr modified the milestones: v0.12.0, v0.13.0 Jan 14, 2026
@poiana
Copy link
Copy Markdown
Contributor

poiana commented Apr 14, 2026

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@FedeDP
Copy link
Copy Markdown
Contributor Author

FedeDP commented Apr 14, 2026

/remove-lifecycle stale

Don't know whether we'll want to ever ship this though.
I am open to rebase this one if there's willing to merge the feature!
Cc @leogr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants