bumblebee icon indicating copy to clipboard operation
bumblebee copied to clipboard

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

Open akshatagarwl opened this issue 1 year ago • 3 comments

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

akshatagarwl avatar Jun 21 '23 06:06 akshatagarwl

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 avatar Jun 21 '23 09:06 krisztianfekete

@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 avatar Jun 22 '23 11:06 akshatagarwl

@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)

akshatagarwl avatar Jun 23 '23 05:06 akshatagarwl