Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]How do I enable CONFIG_CGROUP_BPF when using OpenRC?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
allistarM
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2004
Posts: 141

PostPosted: Fri Jan 19, 2024 11:21 pm    Post subject: [SOLVED]How do I enable CONFIG_CGROUP_BPF when using OpenRC? Reply with quote

Hi all,
My docker environment stopped working and the error when running "docker compose up -d" is:

Code:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown


It seems I need to enable the CONFIG_CGROUP_BPF kernel config option, but this is only available if you're using Systemd. I'm using OpenRC. Here's the details for that config option:

Code:
 Symbol: CGROUP_BPF [=n]
  │ Type  : bool
  │ Defined at init/Kconfig:1157
  │   Prompt: Support for eBPF programs attached to cgroups
  │   Depends on: CGROUPS [=y] && BPF_SYSCALL [=n]
  │   Location:
  │     -> General setup
  │ (1)   -> Control Group support (CGROUPS [=y])
  │         -> Support for eBPF programs attached to cgroups (CGROUP_BPF [=n])
  │ Selects: SOCK_CGROUP_DATA [=y]
  │ Selected by [n]:
  │   - GENTOO_LINUX_INIT_SYSTEMD [=n] && GENTOO_LINUX [=y] && GENTOO_LINUX_UDEV [=y]


How do I enable this option when I'm using OpenRC? If I can't, then how do I run docker on OpenRC?


Last edited by allistarM on Sat Jan 20, 2024 12:57 am; edited 1 time in total
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5595
Location: Bavaria

PostPosted: Fri Jan 19, 2024 11:37 pm    Post subject: Reply with quote

This has nothing to do with systemd. Look at the line:
Quote:
Depends on: CGROUPS [=y] && BPF_SYSCALL [=n]

You have CGROUPS enabled. Good. But your are missing BPF_SYSCALL.

Enable it:
Code:
General setup  --->
    BPF subsystem  --->
        [*] Enable bpf() system call

Now you should be able to enable:
Code:
General setup  --->
    -*- Control Group support  --->
        [*]   Support for eBPF programs attached to cgroups

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
allistarM
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2004
Posts: 141

PostPosted: Sat Jan 20, 2024 12:57 am    Post subject: Reply with quote

Thank you very much! Your post is appreciated. I should read what the kernel config says more closely. I was worried I'd have to convert to systemd which would be an annoyance.

I now have the kernel option enabled and my docker containers are working again.
Thanks again!
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5595
Location: Bavaria

PostPosted: Sat Jan 20, 2024 1:20 am    Post subject: Reply with quote

allistarM wrote:
Thanks again!

You are very Welcome ! :D

Have fun with Gentoo ! 8)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
ricardo82
n00b
n00b


Joined: 10 Jun 2023
Posts: 3

PostPosted: Sat Mar 15, 2025 3:04 pm    Post subject: Thx Reply with quote

pietinger wrote:
This has nothing to do with systemd. Look at the line:
Quote:
Depends on: CGROUPS [=y] && BPF_SYSCALL [=n]

You have CGROUPS enabled. Good. But your are missing BPF_SYSCALL.

Enable it:
Code:
General setup  --->
    BPF subsystem  --->
        [*] Enable bpf() system call

Now you should be able to enable:
Code:
General setup  --->
    -*- Control Group support  --->
        [*]   Support for eBPF programs attached to cgroups


-> solved it for me,
_________________
Ricardo is my name.
I am using gentoo since 2016.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum