Skip to content
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

Use absolute path for rootfs in OCI config.json #22256

Merged
merged 1 commit into from
Apr 23, 2016

Conversation

mlaventure
Copy link
Contributor

@mlaventure mlaventure commented Apr 22, 2016

This avoid an extra bind mount within /var/run/docker/libcontainerd

This should resolve situations where a container having the host
/var/run bound prevents other containers from being cleanly removed
(e.g. #21969).

Signed-off-by: Kenfe-Mickael Laventure mickael.laventure@gmail.com


This is technically making docker non OCI compliant, but then again runc allows it currently :).

There's an open issue for fixing the spec at opencontainers/runtime-spec/issues/389 with an associated PR for fixing the spec at opencontainers/runtime-spec/pull/394

@mlaventure
Copy link
Contributor Author

ping @tonistiigi @crosbymichael

@@ -274,18 +267,6 @@ func (clnt *client) setExited(containerID string) error {
ExitCode: exitCode,
}})

// Unmount and delete the bundle folder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are missing the removal of unmount in 'clean()`. Maybe we would need to keep this unmount code here in some form though in case there was a ungraceful shutdown between the restarts. This method is only called on restore and could handle that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Reverted it somehow before pushing, fixed.

@mlaventure mlaventure force-pushed the use-abs-rootfs-path branch from 8e4d960 to 68d0aa1 Compare April 22, 2016 16:48
This avoid an extra bind mount within /var/run/docker/libcontainerd

This should resolve situations where a container having the host
/var/run bound prevents other containers from being cleanly removed
(e.g. moby#21969).

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
@mlaventure mlaventure force-pushed the use-abs-rootfs-path branch from 68d0aa1 to 3135874 Compare April 22, 2016 17:07
@mlaventure
Copy link
Contributor Author

after discussion with @tonistiigi I put back the umount for the old rootfs bind mount to account for installations that will get upgraded without going through a clean daemon shutdown 😢

@tonistiigi
Copy link
Member

LGTM

@cpuguy83
Copy link
Member

LGTM, but this means we aren't compliant with the OCI spec unless the spec gets updated.

@duglin
Copy link
Contributor

duglin commented Apr 22, 2016

NOT LGTM if it make us violate OCI.
Let's change OCI first.

@duglin
Copy link
Contributor

duglin commented Apr 22, 2016

@mlaventure can you open up a PR in OCI for this? I think I've seen some other people ask for the path even be outside of the bundle dir so allowing for it to be absolute would align with what those folks want.

@cpuguy83
Copy link
Member

@duglin Far more concerned with fixing a real bug than adhering 100% to a pre-1.0 spec.

@duglin
Copy link
Contributor

duglin commented Apr 22, 2016

@mlaventure sorry - I missed that there's already an issue for it, perhaps you could submit a PR to close that issue? Should be easy.

@duglin
Copy link
Contributor

duglin commented Apr 22, 2016

@cpuguy83 the problem is that docker advertises that other OCI compliant runtimes can be plugged in - if we put an absolute path in there instead of a relative one then some other runc variant might not work.
It should a quick/easy fix on the OCI side of things.

@mlaventure
Copy link
Contributor Author

@duglin
Copy link
Contributor

duglin commented Apr 22, 2016

@mlaventure thanks!

@duglin
Copy link
Contributor

duglin commented Apr 22, 2016

Removed my objection. thanks @mlaventure for the quick turn around.

@WeiZhang555 WeiZhang555 mentioned this pull request Apr 26, 2016
WeiZhang555 added a commit to WeiZhang555/moby that referenced this pull request Apr 26, 2016
"TestRestartContainerwithRestartPolicy" contains some codes that could be
flaky, it's supposed to be fixed in moby#22256.

This commit removes unnecessary code, make the test case cleaner.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
@mlaventure mlaventure deleted the use-abs-rootfs-path branch April 29, 2016 00:02
@thaJeztah thaJeztah added area/runtime kind/bugfix PR's that fix bugs labels Jun 22, 2024
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.

7 participants