containerd / containerd/cgroups

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

Open
#294 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.2k
Forks
252
PR merge metrics
No merged PRs in 30d

Description

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//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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.