Skip to content

Correct tmpfs mount for cgroup #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2015
Merged

Conversation

hqhq
Copy link
Contributor

@hqhq hqhq commented Jul 15, 2015

Fixes: moby/moby#14543
Fixes: moby/moby#14610

Before this, we got mount info in container:

sysfs /sys sysfs ro,seclabel,nosuid,nodev,noexec,relatime 0 0
 /sys/fs/cgroup tmpfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,relatime,cpuset 0 0

It has no mount source, so in parseInfoFile in Docker code,
we'll get:

Error found less than 3 fields post '-' in "84 83 0:41 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs  rw,seclabel"

After this fix, we have mount info corrected:

sysfs /sys sysfs ro,seclabel,nosuid,nodev,noexec,relatime 0 0
tmpfs /sys/fs/cgroup tmpfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,relatime,cpuset 0 0

Signed-off-by: Qiang Huang [email protected]

Fixes: moby/moby#14543
Fixes: moby/moby#14610

Before this, we got mount info in container:
```
sysfs /sys sysfs ro,seclabel,nosuid,nodev,noexec,relatime 0 0
 /sys/fs/cgroup tmpfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,relatime,cpuset 0 0
```

It has no mount source, so in `parseInfoFile` in Docker code,
we'll get:
```
Error found less than 3 fields post '-' in "84 83 0:41 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs  rw,seclabel"
```

After this fix, we have mount info corrected:
```
sysfs /sys sysfs ro,seclabel,nosuid,nodev,noexec,relatime 0 0
tmpfs /sys/fs/cgroup tmpfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,relatime,cpuset 0 0
```

Signed-off-by: Qiang Huang <[email protected]>
@mrunalp
Copy link
Contributor

mrunalp commented Jul 15, 2015

LGTM
@LK4D4 ping

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 15, 2015

This is still not full fix. There will be still issues with containers in containers. I'll show you tomorrow what I have.
Also we need tests, original problem was because lack of tests :/

@mrunalp
Copy link
Contributor

mrunalp commented Jul 15, 2015

Yeah I figured that it doesn't solve everything but will be part of the final solution.

Sent from my iPhone

On Jul 14, 2015, at 9:30 PM, Alexander Morozov [email protected] wrote:

This is still not full fix. There will be still issues with containers in containers. I'll show you tomorrow what I have.
Also we need tests, original problem was because lack of tests :/


Reply to this email directly or view it on GitHub.

@mrunalp
Copy link
Contributor

mrunalp commented Jul 15, 2015

I guess we can just wait for your fix tomorrow.

Sent from my iPhone

On Jul 14, 2015, at 9:30 PM, Alexander Morozov [email protected] wrote:

This is still not full fix. There will be still issues with containers in containers. I'll show you tomorrow what I have.
Also we need tests, original problem was because lack of tests :/


Reply to this email directly or view it on GitHub.

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 15, 2015

Yeah, this fix is right anyway. Probably it's better to make it step by step :)
LGTM

LK4D4 added a commit that referenced this pull request Jul 15, 2015
Correct tmpfs mount for cgroup
@LK4D4 LK4D4 merged commit 0d94894 into opencontainers:master Jul 15, 2015
@hqhq hqhq deleted the hq_fix_tmpfs_mount branch July 15, 2015 06:11
@lowenna
Copy link
Contributor

lowenna commented Jul 15, 2015

What's the plan to get this fix into docker/master as moby/moby#13312 wasn't reverted? I'm working on some fixes to the docker-py tests and am hitting what is almost certainly the same thing - Cannot start container. Error found less than 3 fields post '-' in "115 114 0:44 / /sys/fs/cgroup fw,nosuid,nodev,noexec,relatime - tmpfs rw"

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 15, 2015

@jhowardmsft some plans :) we need one more PR merged to full fix
#130 this PR

@lowenna
Copy link
Contributor

lowenna commented Jul 16, 2015

@LK4D4. Thx. I'll do a local revert in the meantime then to validate a different PR.

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 16, 2015

@jhowardmsft Yup, thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can no longer run DinD - Error starting daemon: error initializing graphdriver
5 participants