Closed daniel-wilmes closed 8 months ago
Attempting to reproduce by installing Falco on host machine. Tried modern ebpf for Falco. Test was skipped due to falco k8s daemonset not installing as expected.
From trying out a falco install, I see that the Falco install option chosen was kmod. Will attempt to reproduce issue again with the kmod falco install option.
I tried installing falco with kmod, ebpf and modern ebpf on latest Ubuntu LTS. The the falco k8s app installed by the testsuite fails to complete (and therefore affecting the test). Will look into the issue.
Updates to the testsuite for this ticket are in the bug/1768
branch. Please read below for details on some changes.
Falco helm install wasn't locked to a specific chart version. The option passed to the helm command was outdated and the chart was using the kernel module by default.
Solution: I've locked it to use Falco helm chart version 3.1.5
in the working branch. And updated the option to set the driver to ebpf.
From my own tests on Ubuntu (22.04, 22.10) and Debian 11, I found it hard to pinpoint a specific kernel version for which Falco prebuilt drivers are available. Seems like building a custom driver is straightforward.
When Falco cannot find the prebuilt driver, the logs for the Falco pods would look like below.
Also notice that it looks for the kernel headers in lib/modules
to attempt to build a driver. If the kernel headers on the nodes are available and /lib/modules
on host is mounted as /host/lib/modules
on the falco pods, then Falco will also try to build the driver for the kernel.
In the absence of prebuilt drivers, following are the available options:
These drivers may be a kernel module or ebpf probe.
Using these solutions may require passing custom Helm values for the Falco helm chart installation. I've added the FALCO_HELM_OPTS
env var to help with this.
Here's how I've been using this env var:
falco-values.yml
FALCO_HELM_OPTS
to run the testsuite like below.FALCO_HELM_OPTS="-f falco-values.yml" ./cnf-testsuite non_root_user
I've been referring to Falco chart's values.yml to construct my yaml file for Falco install. Below is an example to mount the custom ebpf probe I built for my kernel.
Note: By default the only option the testsuite passes to Falco's helm chart install is
driver.kind=ebpf
. WhenFALCO_HELM_OPTS
is passed, no other options are passed by the testsuite. This is to allow users to use the kernel module driver if required.
driver:
enabled: true
kind: ebpf
ebpf:
path: "/falco-driver/falco-ubuntu.o"
mounts:
volumes:
- name: "driver-fs"
hostPath:
path: "/falco-driver"
volumeMounts:
- mountPath: "/falco-driver"
name: driver-fs
main
branch and setup cnf-testsuite from source install instructionsFALCO_HELM_OPTS="-f falco-values.yml" ./cnf-testsuite non_root_user
, I should see this pass and not skip due to headers not installed to support Falco.@daniel-wilmes Is this issue still occurring? If so, please share additional information to help with debugging.
@daniel-wilmes Is this issue still occurring? If so, please share additional information to help with debugging.
@lixuna We discussed closing this ticket on the call and opening an enhancement ticket to discuss the test's implementation (or replacement if required) due to the effort required to configure the test to be run.
I'll create another ticket for the enhancement/discussion.
Describe the bug Running the non_root_user test fails because of falco not being installed. Falco driver has this error on deployment:
I was able to run this test prior to the current cnf test suite release.
We are running this in kind for our environment.
To Reproduce Steps to reproduce the behavior:
Screenshots
Device (please complete the following information):
Here are the logs when running the test suite.
non_root_user.log