Uh oh!
There was an error while loading. Please reload this page.
Replace Linux.Device with more specific config - #94
Conversation
There was a problem hiding this comment.
We should probably specify or describe in this doc what each of the fields mean. But overall this PR looks good
There was a problem hiding this comment.
I'll combine description from docstrings.
There was a problem hiding this comment.
Is there ever a reason not to include null, random, full, tty, zero and urandom? It seems like we should just say every container can expect to have those device nodes available without specifying.
There was a problem hiding this comment.
Ah, okay, thought about this just like about json example, not real config :) I'll add all from runc defaults.
There was a problem hiding this comment.
@LK4D4 Yes, I will file a separate issue on this one.
philips
commented
Aug 5, 2015
LGTM overall, I do think we should consider making the "obvious" device nodes available as they are a pretty accepted part of the POSIX API. |
62ba998 to
0512e7eComparewking
commented
Aug 5, 2015
On Wed, Aug 05, 2015 at 03:26:47PM -0700, Alexander Morozov wrote:
Can you elaborate on this or provide a concrete example? I'd guess |
e923f70 to
85586b4CompareLK4D4
commented
Aug 6, 2015
@wking For example we want different cgroups permissions for devices. Another case is to creating device in paths which doesn't exists on host. Also this interface maps pretty well to device creation process on the host, I don't see why we should try to cut it off. |
philips
commented
Aug 6, 2015
I don't think a full exhaustive list of many devices is necessary in the spec to illustrate but it LGTM. |
85586b4 to
456c6bdCompareThere was a problem hiding this comment.
From my instinct, the abbreviation of r/w/m is OK for permissions. But here, I think we should use "character", "block" and "fifo". I don't have strong reason, just feeling.
There was a problem hiding this comment.
I think this is okay as more information could be looked up in the man page.
wking
commented
Aug 6, 2015
On Wed, Aug 05, 2015 at 05:37:28PM -0700, Alexander Morozov wrote:
For “devices in paths which don't exist on the host”, it seems like For “I want special cgroups on $PATH”, it seems like that would be { As this PR stands, I'm not sure how you'd use wildcards for |
LK4D4
commented
Aug 6, 2015
@wking I can add to description, that -1 will mean wildcard. |
wking
commented
Aug 6, 2015
On Thu, Aug 06, 2015 at 10:10:30AM -0700, Alexander Morozov wrote:
If you have a -1 in the spec, and the device doesn't exist on the |
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
456c6bd to
5273b3dCompareLK4D4
commented
Aug 6, 2015
@wking It's up to you which value you will pass, I don't like any |
wking
commented
Aug 6, 2015
On Thu, Aug 06, 2015 at 10:29:10AM -0700, Alexander Morozov wrote:
No, I meant “assuming the -1 wildcard 1, if I put a -1 major value
I'm ok dropping that section, since bundle authors that want to copy Maybe it would help if I just PRed my suggestion… |
LK4D4
commented
Aug 6, 2015
@wking Yup, example of your thoughts in code would be perfect. |
wking
commented
Aug 6, 2015
crosbymichael
commented
Aug 6, 2015
LGTM |
Replace Linux.Device with more specific config
wking
commented
Aug 6, 2015
LK4D4
commented
Aug 7, 2015
@wking Basically, if you want to use wildcard, then you need to skip Path, because otherwise runtime will try to mknod. If Permissions is not empty - then device is allowed. That's whole relationship between devices and cgroup as I see it. I don't see a big problem if it'll be documented. |
wking
commented
Aug 7, 2015
On Thu, Aug 06, 2015 at 05:32:17PM -0700, Alexander Morozov wrote:
I started working on a PR documenting this, but I'm not sure how to |
I'd prefer to handle mknod and device cgroups independently [1,2], to avoid all this "If path is given..." and "If parameters is given..." special casing. But the overloaded approach has landed [3], so this commit documents the indended semantics [4]. I'm not sure how bundle authors are supposed to register deny cgroups rules [5]. [1]: opencontainers#98 [2]: opencontainers#99 [3]: opencontainers#94 (comment) [4]: opencontainers#94 (comment) [5]: opencontainers#94 (comment) Signed-off-by: W. Trevor King <wking@tremily.us>
LK4D4
commented
Aug 7, 2015
@wking basically idea was to |
wking
commented
Aug 7, 2015
On Fri, Aug 07, 2015 at 10:10:38AM -0700, Alexander Morozov wrote:
That may be overly strict for child containers. What if you want to |
wking
commented
Aug 7, 2015
via email
I've floated some more explicit docs in #101, if we want to talk about
the semantics and docs for allow vs. deny there. |
LK4D4
commented
Aug 7, 2015
@wking Maybe it's better to discuss this in IRC. It's too much for closed PR. |
I filed a PR to keep this separate [1], but it was closed after [2] landed. See also [3], where I point out that putting the mknod stuff in the “control groups” section is awkward. [1]: opencontainers/runtime-spec#99 Add linux.resources.devices [2]: opencontainers/runtime-spec#94 Replace Linux.Device with more specific config [3]: opencontainers/runtime-spec#171 (comment) move the description of user ns mapping and default files to proper file
It appeared that we need more control over devices, for example different permissions and choosing path on caller side.