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

Remount /sys/fs/cgroup as readonly always #136

Merged
merged 1 commit into from
Jul 17, 2015

Conversation

LK4D4
Copy link
Contributor

@LK4D4 LK4D4 commented Jul 17, 2015

Now it is exactly like on host.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
@mrunalp
Copy link
Contributor

mrunalp commented Jul 17, 2015

LGTM

mrunalp pushed a commit that referenced this pull request Jul 17, 2015
Remount /sys/fs/cgroup as readonly always
@mrunalp mrunalp merged commit 11370f0 into opencontainers:master Jul 17, 2015
@LK4D4 LK4D4 deleted the remount_sysfs branch July 17, 2015 20:45
stefanberger pushed a commit to stefanberger/runc that referenced this pull request Sep 8, 2017
Change layout of mountpoints and mounts
stefanberger pushed a commit to stefanberger/runc that referenced this pull request Sep 8, 2017
c18c283 (Change layout of mountpoints and mounts, 2015-09-02, opencontainers#136)
removed the destination field from the Go type and examples, but
forgot to remove it from the documentation [1].  Fix that with this
commit.

[1]: opencontainers/runtime-spec#109 (comment)

Reported-by: 梁辰晔 (Liang Chenye) <liangchenye@huawei.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
stefanberger pushed a commit to stefanberger/runc that referenced this pull request Sep 8, 2017
'destination' has been the path inside the container since c18c283
(Change layout of mountpoints and mounts, 2015-09-02, opencontainers#136).  My
personal preference is to have an explicit pivot root and allow paths
relative to the current working directory [1], but that would be a big
shift from the current OCI spec.  The only way the current spec lets
you turn off the root pivot is by not setting a mount namespace at all
(and even then, it's not clear if that turns off the pivot).  And the
config's root entry is required (despite my attempts to have it made
optional [2]), so it's not really clear how containers that don't set
a mount namespace are supposed to work (if they're supported at all).

You might be able to get away with something like:

  When a mount namespace is not set, destination paths are relative to
  the runtime's initial working directory (or relative to the
  config.json, or whatever).  When a mount namespace is set,
  destination paths are relative to the mount namespace's root.

but with mount-namespace-less containers already so unclear, it seems
better to just require absolute destinations.  If/when we get clearer
support for explicit pivot-root calls or containers that inherit the
host mount namespace (without re-joining it and losing their old
working directory), we can consider lifting the absolute-path
restriction.

[1]: https://github.com/wking/ccon/tree/v0.4.0#mount-namespace
[2]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/6ZKMNWujDhU
     Date: Wed, 26 Aug 2015 12:54:47 -0700
     Subject: Dropping the rootfs requirement and restoring arbitrary bundle
       content
     Message-ID: <20150826195447.GX21585@odin.tremily.us>

Signed-off-by: W. Trevor King <wking@tremily.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants