-
Notifications
You must be signed in to change notification settings - Fork 593
access of device cgroup is optional depends on type #914
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
Conversation
|
We usually error towards secure and explicit. This change would be the opposite of both. |
|
On Fri, Aug 25, 2017 at 07:37:59AM +0000, Ma Shimiao wrote:
In Linux, only when type is a, access can be unset. So, I think if
we have to make access as OPTIONAL, let it to be `rwm` as default
may be better.
Or REQUIRE it when type is equivalent to ‘a’?
|
|
On 08/26/2017 12:32 AM, W. Trevor King wrote:
Or REQUIRE it when type is equivalent to ‘a’?
Just the opposite.
When type is `a`, access can be OPTIONAL.
Otherwise, access must be REQURIE.
|
f50c5dd to
0a245ef
Compare
|
updated, PTAL |
config-linux.md
Outdated
| Unset value means "all", mapping to [`*` in the filesystem API][cgroup-v1-devices]. | ||
| * **`access`** *(string, OPTIONAL)* - cgroup permissions for device. | ||
| A composition of `r` (read), `w` (write), and `m` (mknod). | ||
| * When type is not `a`, `access` is REQUIRED. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't define our property-specification syntax (I'd taken a stab at that in #747, see requirement-condition here), but our current pattern for conditionally-required properties would be:
access(string, REQUIRED whentypeisborc) - cgroup permissions for device.
A composition…
Existing examples are:
$ git grep 'REQUIRED \(when\|unless\)' v1.0.0 --
v1.0.0:config-linux.md:* **`major, minor`** *(int64, REQUIRED unless `type` is `p`)* - [major, minor numbers][devices] for the device.
v1.0.0:config.md: This property is REQUIRED when [`start`](runtime.md#start) is called.
v1.0.0:runtime.md:* **`pid`** (int, REQUIRED when `status` is `created` or `running` on Linux, OPTIONAL on other platforms) is the ID of the container process, as seen by the host.
Signed-off-by: Ma Shimiao <[email protected]>
0a245ef to
c997e61
Compare
|
On 09/01/2017 04:38 AM, W. Trevor King wrote:
|v1.0.0:config-linux.md:* **`major, minor`** *(int64, REQUIRED unless `type` is `p`)* - [major, minor numbers][devices] for the device.|
I think the first one seems more elegant.
|
| Unset values mean "all", mapping to [`*` in the filesystem API][cgroup-v1-devices]. | ||
| * **`access`** *(string, OPTIONAL)* - cgroup permissions for device. | ||
| Unset value means "all", mapping to [`*` in the filesystem API][cgroup-v1-devices]. | ||
| * **`access`** *(string, REQUIRED unless `type` is `a`)* - cgroup permissions for device. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this phrasing leaves the type-unset case (where type is only effectively a) less clear than my earlier recomendation. But whatever, I expect folks will get the idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer this one, because when type is unset it mapped to a, so we may can say type is always set.
|
ping @opencontainers/runtime-spec-maintainers |
1 similar comment
|
ping @opencontainers/runtime-spec-maintainers |
|
👎 |
In Linux, only when type is a, access can be unset. So, I think if we have to make access as OPTIONAL, let it to be
rwmas default may be better.Signed-off-by: Ma Shimiao [email protected]