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

Package pwru for major distros #89

Open
brb opened this issue Sep 21, 2022 · 17 comments
Open

Package pwru for major distros #89

brb opened this issue Sep 21, 2022 · 17 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@brb
Copy link
Member

brb commented Sep 21, 2022

Each pwru release published in https://github.com/cilium/pwru/releases is statically linked, and it doesn't have any runtime dependencies. So, it should be trivial to package for major distros (Archlinux, Ubuntu, Debian, Fedora, etc).

@brb brb added good first issue Good for newcomers help wanted Extra attention is needed labels Sep 21, 2022
@varunkumare99
Copy link
Contributor

I would like to work on this.
Any advice on how to begin?
Thanks

@brb
Copy link
Member Author

brb commented Nov 2, 2022

Let me ping some maintainers first. Mind pinging me (martynas) on Slack? We can coordinate there.

@varunkumare99
Copy link
Contributor

sure!

@ShubhamPalriwala
Copy link

Hey @brb Is this still up for grabs? Let me know if I can try tacking this

@brb
Copy link
Member Author

brb commented Apr 3, 2023

Yep, just that I still didn't manage to coordinate all efforts with pkg maintainers. Which distro would you target first?

@ShubhamPalriwala
Copy link

I use Arch Linux so I would prefer that as a good starting point.

Also, if possible, can you share some articles/docs I can refer to with respect to packaging such an app

@brb
Copy link
Member Author

brb commented Apr 4, 2023

Great! I'm not familiar with distro packaging. Perhaphs you could reach out to the Arch community? @Foxboron mentioned that he might help with Arch.

@Foxboron
Copy link

Foxboron commented Apr 5, 2023

Sorry for the delay. I've been busy with other Arch projects and haven't had time to package new things into the repositories for a couple of months.

I've uploaded cilium-cli and pwru to the Arch repos today. Debug packages are also available from https://debuginfod.archlinux.org as well.

https://archlinux.org/packages/community/x86_64/pwru/
https://archlinux.org/packages/community/x86_64/cilium-cli/

Package files can be found here.
https://github.com/Foxboron/archlinux-pkgbuilds/tree/master/pwru
https://github.com/Foxboron/archlinux-pkgbuilds/tree/master/cilium-cli

@brb
Copy link
Member Author

brb commented Apr 13, 2023

@Foxboron Thanks a lot!

@brb
Copy link
Member Author

brb commented Apr 17, 2023

@ShubhamPalriwala Maybe let's continue with Debian/Ubuntu?

@terinjokes
Copy link

terinjokes commented May 24, 2023

bfp2go looks at /sys/devices/system/cpu/possible on the building machine to determine the number of cores to add hooks for, and pwru seems to fail if the number does not match what is observed at runtime. This makes it pretty difficult to build any distribution packages, even for internal corporate distribution.

@tao12345666333
Copy link

I can help for Fedora

@brb
Copy link
Member Author

brb commented May 25, 2023

@terinjokes Do you have an output of such a failure?

@brb
Copy link
Member Author

brb commented May 25, 2023

@tao12345666333 Great! Will you ping Fedora pkg maintainers?

@tao12345666333
Copy link

yes.

@terinjokes
Copy link

terinjokes commented May 25, 2023

@brb If the machine that compiled pwru has more CPUs than the machine that runs it I get the following error, along with an exit code 1:

Creating perf event reader: failed to create perf ring for CPU 1: can't create perf event: Invalid argument

If the machine that compiled pwru has less CPUs than the target machine (eg, was built in a CI environment) it runs without any error messages, but I don't see packets scheduled onto the higher CPU cores.

I can create a separate issue, but seems like the current implementation will have issues with distribution packages.

@brb
Copy link
Member Author

brb commented May 26, 2023

@terinjokes Could you create a separate issue, and include strace output? Thanks. My colleague said that the CPU detection should happen during the runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: No status
Development

No branches or pull requests

6 participants