fix: solve some verifier issues and introduce a bpf CI#135
Conversation
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
max key size on kernels < 5.11 is always 512 so we need to rewrite map specs in order to match this value Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
|
I would like to test the new action I introduced, but I cannot due to @holyspectral @dottorblaster, can you help me with this? |
900e85c to
9a501ce
Compare
|
Just some thoughts:
For now, I'm using bpfvalidator in CI because it is easier to set up and I'm more familiar with it. I have to admit I tried LVH in CI this morning, but I had some issues with the configuration... maybe in the near future we can switch to LVH, even if for now I'm not super sure it will bring a big additional value to what we have, maybe it could help us if we will build our own custom images... A possible improvement to this PR could be to add an automatic job/dependabot that scrapes the Ubuntu mainline once per day and opens a PR with the updated image versions. Similar to what is done here https://github.com/cilium/pwru/blob/9ac30b44809321a96f189c2957d958a3122faee6/.github/workflows/test.yml#L61 |
|
Right now, the CI is running our ebpf tests inside each machine; it seems they don't work on some kernels, I need to check. Moreover, bpfvalidator is not reporting the failure in the output. I need to check this as well. |
I have a feeling that we might be able to use kernels downloaded from lvh, I will take a look to see if this is possible, but before that I have to setup virtme-ng...something is wrong in my env. |
|
okay it's the Ubuntu distribution of virtme-ng was broken. https://bugs.launchpad.net/ubuntu/+source/virtme-ng/+bug/2104184 Now I can use the kernel successfully via the steps here: It took roughly 35 seconds to download and enter the kernel. |
|
yep exactly, if we want, we can use LVH to build and push images somewhere, and then run them with virtme-ng. we can also modify bpfvalidator to take as input a lvh built image and start virtme-ng for us But yeah, still don't know what is the best choice for the CI 🤔 maybe we can end up using virtme-ng for local development and quick iteration, and LVH in CI if we want to reuse the infrastructure of cilium without building |
ea61703 to
46e41fe
Compare
|
The main issue that I see at the moment is that ebpf tests could be flaky. What we do at the moment is:
Currently, we are running four machines in parallel on a small GitHub runner, so a 10-second timeout could not be enough. If we see they are too flaky, we can disable them and just check the verifier for now without running the test suite. |
dottorblaster
left a comment
There was a problem hiding this comment.
LGTM, I just left two comments that you can absolutely ignore 👍 (especially the opne about the constants)
| return err | ||
| } | ||
|
|
||
| // OK! |
There was a problem hiding this comment.
LOL do you want to keep this comment?
| if s <= stringMapSize7 { | ||
| return stringMapSize7 | ||
| } | ||
| if s <= stringMapSize8 { | ||
| return stringMapSize8 | ||
| } | ||
| if s <= stringMapSize9 { | ||
| return stringMapSize9 |
There was a problem hiding this comment.
This is absolutely for the future but these constant names are very weird 😄
Is that bpf-idiomatic to have constants named like this?
There was a problem hiding this comment.
nope, just random names, but I would probably do that in a cleanup PR
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
Signed-off-by: Andrea Terzolo <andrea.terzolo@suse.com>
46e41fe to
86df41c
Compare
|
just triggered again the CI to see how it goes |
What this PR does / why we need it:
This PR solves some verifier issues and introduces a bpf CI
Which issue(s) this PR fixes
fixes #88
Special notes for your reviewer:
Checklist: