Do not create cgroup dir name from combining subsystems #1268

Merged
merged 1 commit into from Jan 11, 2017

Projects

None yet

3 participants

@hqhq
Contributor
hqhq commented Jan 11, 2017

On some systems, when we mount some cgroup subsystems into
a same mountpoint, the name sequence of mount options and
cgroup directory name can not be the same.

For example, the mount option is cpuacct,cpu, but
mountpoint name is /sys/fs/cgroup/cpu,cpuacct. In current
runc, we set mount destination name from combining
subsystems, which comes from mount option from
/proc/self/mountinfo, so in my case the name would be
/sys/fs/cgroup/cpuacct,cpu, which is differernt from
host, and will break some applications.

Fix it by using directory name from host mountpoint.

Signed-off-by: Qiang Huang h.huangqiang@huawei.com

@hqhq hqhq Do not create cgroup dir name from combining subsystems
On some systems, when we mount some cgroup subsystems into
a same mountpoint, the name sequence of mount options and
cgroup directory name can not be the same.

For example, the mount option is cpuacct,cpu, but
mountpoint name is /sys/fs/cgroup/cpu,cpuacct. In current
runc, we set mount destination name from combining
subsystems, which comes from mount option from
/proc/self/mountinfo, so in my case the name would be
/sys/fs/cgroup/cpuacct,cpu, which is differernt from
host, and will break some applications.

Fix it by using directory name from host mountpoint.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
0599ac7
@mrunalp
Contributor
mrunalp commented Jan 11, 2017 edited

LGTM

Approved with PullApprove

@dqminh
Contributor
dqminh commented Jan 11, 2017 edited

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit 361bb00 into opencontainers:master Jan 11, 2017

3 checks passed

code-review/pullapprove Approved by dqminh, mrunalp
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
janky Jenkins build runc-PRs 2688 has succeeded
Details
@hqhq hqhq deleted the hqhq:use_source_mp branch Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment