error: cannot find cgroup plugin for cgroup/v2

https://www.reddit.com/r/SLURM/comments/vjquih/error_cannot_find_cgroup_plugin_for_cgroupv2/

Dear SLURMers,

my slurmd does not want to start. The slurmd.log tells me:

error: Couldn’t find the specified plugin name for cgroup/v2 looking at all files error: cannot find cgroup plugin for cgroup/v2 error: cannot create cgroup context for cgroup/v2 error: Unable to initialise cgroup plugin error: slurmd initialisation failed This reads as if it is missing a library while building. I had similar errors when setting up the slurmdbd and the lib for mariadb was missing. But what am i missing here? installing libcgroup-dev did not help.

Im on ubuntu 22.04 with slurm-22.05.2 . Builing from source.

Best

3 · 10 Comments Section u/AhremDasharef avatar AhremDasharef • 4y ago From the “Requirements” section of the Slurm docs on cgroups v2:

For building cgroup/v2 there are two required libraries checked at configure time. Look at your config.log when configuring to see if they were correctly detected on your system.

Do you have the kernel-headers and dbus-devel packages installed? Did you build Slurm with the “–with-ebpf” flag? Does your config.log show that these requirements were correctly detected?

1 inDane OP • 4y ago error: cannot read (null)/system.slice/slurmd.service/cgroup.controllers: No such file or directory error: Couldn’t load specified plugin name for cgroup/v2: Plugin init() callback failed error: cannot create cgroup context for cgroup/v2 error: Unable to initialise cgroup plugin error: slurmd initialisation failed Thanks for your answer! After installing libdbus-1-dev the error message changed a bit. Unfortunately it is still not running.

In the config.log:

pkg_cv_dbus_CFLAGS=’-I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include ‘ pkg_cv_dbus_LIBS=’-ldbus-1 ‘ dbus_CFLAGS=’-I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include ‘ dbus_LIBS=’-ldbus-1 ‘ That looks like dbus is found.

configure:24521: checking for bpf installation configure:24538: result: /usr and bpf also, right?

I wasn’t using the flag, but I will try it next.

linux-headers-generic are also installed.

Best

EDIT: The flag didn’t change anything

1 u/AhremDasharef avatar AhremDasharef • 4y ago Hooray, a different error message! :-D

dbus is the mechanism Slurm uses to manipulate cgroups, so it sounds like now that this dependency has been satisfied, Slurm is looking for the cgroup controllers, but can’t find them:

error: cannot read (null)/system.slice/slurmd.service/cgroup.controllers: No such file or directory

Are cgroups v2 configured correctly on the machine? If you run “mount grep cgroup” do you see cgroup controllers mounted on e.g. /sys/fs/cgroup/something? If you run “stat -c %T -f /sys/fs/cgroup” does it return “cgroup2fs”?

1 inDane OP • 4y ago oww… i slept on creating a cgroup.conf… apparently a

sudo touch /usr/local/etc/cgroup.conf

is enough to make that second error go away.

Although sinfo is showing the node as down… anyways this is a partial success so far :) thanks!

Edit: state idle now ;D

2 u/Such-Atmosphere5698 avatar Such-Atmosphere5698 • 4y ago Hi, I’m running Alma Linux 9, and ran into the same problem. I’m getting

error: cannot read (null)/system.slice/slurmd.service/cgroup.controllers: No such file or directory error: Couldn’t load specified plugin name for cgroup/v2: Plugin init() callback failed error: cannot create cgroup context for cgroup/v2 error: Unable to initialise cgroup plugin error: slurmd initialisation failed while mount | grep cgroup returns

cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot) and stat -c %T -f /sys/fs/cgroup returns cgroup2fs.

Any idea what can be wrong?

Thanks!

1 Continue this thread u/Cellularhacker avatar Cellularhacker • 3y ago For other people who like me, I’m writing this comment.

Based on slurm-22.05.4.tar.bz2, it looks like the tar boll file missing some source codes for cgroup/v2 plugin. So I solved this problem by adding this line on /etc/slurm/cgroup.conf

CgroupPlugin=cgroup/v1 The reason why I put that value is that I saw an article/thread that cgroup v2 also supports cgroup v1 by it self.

Thanks.

1 u/rbn_hln avatar rbn_hln • 3y ago Thank you, that helped a lot! Can you link the article/thread you are reffering to?

Updated: