while parsing /sys/fs/cgroup/cgroup.controllers to get the list of controller _get_controllers (src/plugins/cgroup/v2/cgroup_v2.c) doesn't trim the \n at the end. as a result it fails if any of the cgroups controller the plugin is intereseted in happens to be last.
cpuset cpu io memory
Steps to Reproduce:
1. install and configure slurmd
2. enable cgroup_V2 plugin
3. start slurmd
slurmd fails to detect the last cgroup controller in /sys/fs/cgroup/cgroup.controllers (in my case it was the memory controller). and complains in logs
said cgroup detected une used
the probleme stems from th4e fact that theres a new line in /sys/fs/cgroup/cgroup.controllers and at no point _get_controllers tries to get rid of it!
Created attachment 826279 [details, diff]
adding '\n' to delimitiers of strtok() solves the problem
Could you send the patch upstream to slurm please?
(I did open a bug report there before doing it here though, I just omitted the patch)