Skip to content

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

Description

@oligo-galgiladi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions