Fix cpuset issue with cpuset.cpu_exclusive#1194
Merged
mrunalp merged 1 commit intoopencontainers:masterfrom Nov 29, 2016
Merged
Fix cpuset issue with cpuset.cpu_exclusive#1194mrunalp merged 1 commit intoopencontainers:masterfrom
mrunalp merged 1 commit intoopencontainers:masterfrom
Conversation
This PR fix issue in this scenario: ``` in terminal 1: ~# cd /sys/fs/cgroup/cpuset ~# mkdir test ~# cd test ~# cat cpuset.cpus 0-3 ~# echo 1 > cpuset.cpu_exclusive (make sure you don't have other cgroups under root) in terminal 2: ~# echo $$ > /sys/fs/cgroup/cpuset/test/tasks // set resources.cpu.cpus="0-2" in config.json ~# runc run test1 back to terminal 1: ~# cd test1 ~# cat cpuset.cpus 0-2 ~# echo 1 > cpuset.cpu_exclusive in terminal 3: ~# echo $$ > /sys/fs/cgroup/test/tasks // set resources.cpu.cpus="3" in config.json ~# runc run test2 container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \"failed to write 0-3\\n to cpuset.cpus: write /sys/fs/cgroup/cpuset/test2/cpuset.cpus: invalid argument\"" ``` Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
3d3fae1 to
aee4686
Compare
Member
1 similar comment
Contributor
hqhq
added a commit
to hqhq/runc
that referenced
this pull request
Jan 17, 2017
Fixes: moby/moby#80 Upstream: opencontainers#1194 This PR fix issue in this scenario: ``` in terminal 1: ~# cd /sys/fs/cgroup/cpuset ~# mkdir test ~# cd test ~# cat cpuset.cpus 0-3 ~# echo 1 > cpuset.cpu_exclusive (make sure you don't have other cgroups under root) in terminal 2: ~# echo $$ > /sys/fs/cgroup/cpuset/test/tasks // set resources.cpu.cpus="0-2" in config.json ~# runc run test1 back to terminal 1: ~# cd test1 ~# cat cpuset.cpus 0-2 ~# echo 1 > cpuset.cpu_exclusive in terminal 3: ~# echo $$ > /sys/fs/cgroup/test/tasks // set resources.cpu.cpus="3" in config.json ~# runc run test2 container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \"failed to write 0-3\\n to cpuset.cpus: write /sys/fs/cgroup/cpuset/test2/cpuset.cpus: invalid argument\"" ``` Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
hqhq
added a commit
to hqhq/runc
that referenced
this pull request
Jan 17, 2017
Fix cpuset issue with cpuset.cpu_exclusive Fixes: moby/moby#80 Upstream: opencontainers#1194 This PR fix issue in this scenario: ``` in terminal 1: ~# cd /sys/fs/cgroup/cpuset ~# mkdir test ~# cd test ~# cat cpuset.cpus 0-3 ~# echo 1 > cpuset.cpu_exclusive (make sure you don't have other cgroups under root) in terminal 2: ~# echo $$ > /sys/fs/cgroup/cpuset/test/tasks // set resources.cpu.cpus="0-2" in config.json ~# runc run test1 back to terminal 1: ~# cd test1 ~# cat cpuset.cpus 0-2 ~# echo 1 > cpuset.cpu_exclusive in terminal 3: ~# echo $$ > /sys/fs/cgroup/test/tasks // set resources.cpu.cpus="3" in config.json ~# runc run test2 container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \"failed to write 0-3\\n to cpuset.cpus: write /sys/fs/cgroup/cpuset/test2/cpuset.cpus: invalid argument\"" ``` Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> See merge request docker/runc!18
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fix issue in this scenario:
Signed-off-by: Qiang Huang h.huangqiang@huawei.com