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

How to run using Podman (rootless mode by default)? #107

Open
akshatagarwl opened this issue Jun 21, 2023 · 3 comments
Open

How to run using Podman (rootless mode by default)? #107

akshatagarwl opened this issue Jun 21, 2023 · 3 comments
Labels
question Further information is requested

Comments

@akshatagarwl
Copy link

I understand that it's not really possible to run these BPF programs in rootless mode so how do I provide Podman the necessary permissions so that it can build the bumblebee programs

Steps to reproduce:

  • install Podman Docker Compat by sudo dnf install podman-docker
  • bee build examples/tcpconnect/tcpconnect.c tcpconnect
 ▀ Compiling BPF program (0s)Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
+ CFLAGS=
+ clang-13 -g -O2 -target bpf -D__TARGET_ARCH_x86 -Wall -c examples/tcpconnect/tcpconnect.c -o examples/tcpconnect/tcpconnect.o
clang: error: no such file or directory: 'examples/tcpconnect/tcpconnect.c'
clang: error: no input files

  ERROR   Failed to compile BPF program                                                                                                 
Error: exit status 1
2023/06/21 11:57:32 exiting: exit status 1

OS Details

cat /etc/os-release
NAME="Fedora Linux"
VERSION="38 (Workstation Edition)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="Workstation Edition"
VARIANT_ID=workstation

@krisztianfekete
Copy link
Member

krisztianfekete commented Jun 21, 2023

Hey, that issue might not be related to the rootless mode, but the error message you got seems weird.
At some point I have used podman to build these images and I can confirm it should works without any additional config.

I used a debian machine, installed the podman package only, then built the images like this:

bee build -b podman examples/tcpconnect/tcpconnect.c tcpconnect:0.0.1

You can specify the builder with -b, but I'd expect to see a different error if you are just using a wrong builder. Anyway, can you please try it with this flag?

@krisztianfekete krisztianfekete added the question Further information is requested label Jun 21, 2023
@akshatagarwl
Copy link
Author

@krisztianfekete still getting the same error. Anything I can do to debug this further?

bee build -b podman examples/tcpconnect/tcpconnect.c tcpconnect:0.0.1

 ▀ Compiling BPF program (0s)+ CFLAGS=
+ clang-13 -g -O2 -target bpf -D__TARGET_ARCH_x86 -Wall -c examples/tcpconnect/tcpconnect.c -o examples/tcpconnect/tcpconnect.o
clang: error: no such file or directory: 'examples/tcpconnect/tcpconnect.c'
clang: error: no input files

  ERROR   Failed to compile BPF program                                                                                                 
Error: exit status 1
2023/06/22 17:16:44 exiting: exit status 1

@akshatagarwl
Copy link
Author

@krisztianfekete On running bee run ghcr.io/solo-io/bumblebee/tcpconnect:$(bee version) I can see this.
image
Although on quitting it shows this error on the command line

[akshat@xps bumblebee]$  bee run ghcr.io/solo-io/bumblebee/tcpconnect:$(bee version)
 SUCCESS  Fetching program from registry: ghcr.io/solo-io/bumblebee/tcpconnect:0.0.14                                                   
Error: program tcp_v4_connect: CO-RE relocations: can't read types: type id 4946: unknown kind: Unknown (19)
2023/06/23 11:12:41 exiting: program tcp_v4_connect: CO-RE relocations: can't read types: type id 4946: unknown kind: Unknown (19)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants