This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgroups: set value for cpuset if it's empty
fix issue when echo "$id" > /sys/fs/cgroup/cpu/docker/$container-id/tasks will get error message: no space left on device, this is because cpuset.cpus and cpuset.mems in the container's cpu cgroup directory is empty, the following test can explain this: [root@r10e19288.sqa.zmf /sys/fs/cgroup/cpu] $ cat footest/cpuset.cpus [root@r10e19288.sqa.zmf /sys/fs/cgroup/cpu] $ cat footest/cpuset.mems [root@r10e19288.sqa.zmf /sys/fs/cgroup/cpu] $ echo 1 > footest/cgroup.procs bash: echo: write error: No space left on device set value in cpuset.cpus and cpuset.mems can fix the problem [root@r10e19288.sqa.zmf /sys/fs/cgroup/cpu] $ echo "0-1" > footest/cpuset.mems [root@r10e19288.sqa.zmf /sys/fs/cgroup/cpu] $ echo "0-1" > footest/cpuset.cpus [root@r10e19288.sqa.zmf /sys/fs/cgroup/cpu] $ echo 1 > footest/cgroup.procs [root@r10e19288.sqa.zmf /sys/fs/cgroup/cpu] $ cat footest/cgroup.procs 1 this patch fix above issue by copy data from cpu cgroup root directory to container's cpuset.cpus and cpuset.mems Fixes #642. Signed-off-by: Ace-Tang <aceapril@126.com>
- Loading branch information
Showing
4 changed files
with
170 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters