Overview
Users may encounter issues with missing Cgroup files, such as /sys/fs/cgroup/cpu/cpu.shares
and /sys/fs/cgroup/memory/memory.max_usage_in_bytes
, in CircleCI build containers. This is due to the transition from CgroupV1 to CgroupV2, which affects how resource information is accessed within the containers.
Solution
-
Understanding the Change: CircleCI is transitioning from CgroupV1 to CgroupV2. This change affects the availability of certain files used to determine resource allocation in build containers.
-
Adjusting Scripts for CgroupV2:
- Instead of using
/sys/fs/cgroup/cpu/cpu.shares
, use/sys/fs/cgroup/cpu.max
. - Instead of using
/sys/fs/cgroup/memory/memory.max_usage_in_bytes
, consider using/sys/fs/cgroup/memory.peak
.
- Instead of using
-
Planning for CgroupV2: Begin planning to update your scripts to be compatible with CgroupV2, as this will be the standard going forward.
Comments
Article is closed for comments.