cgroups icon indicating copy to clipboard operation
cgroups copied to clipboard

Calling cgroup V1 New function fails for kernels that don't have swap enabled

Open oligo-galgiladi opened this issue 2 years ago • 0 comments

Hello,

I encountered an issue with creating a new cgroup when using cgroup V1, on a system that doesn't have swap enabled.

I eventually get the following error: open /sys/fs/cgroup/memory/<cgroup-name>/memory.memsw.limit_in_bytes: permission denied

This error is returned from the InitializeSubsystem function. After this function is called, the returned error is checked to be ErrControllerNotActive, and since this is not the returned error, the code does not continue to the InitCheck part, and so the user has no option to ignore the error.

I suggest to change the code that checks the returned error from InitializeSubsystem, so that it would use the InitCheck function regardless of the type of the returned error.

oligo-galgiladi avatar May 22 '23 12:05 oligo-galgiladi