generate: Assign value to devices.type when the value is empty#375
Closed
zhouhao3 wants to merge 1 commit intoopencontainers:masterfrom
Closed
generate: Assign value to devices.type when the value is empty#375zhouhao3 wants to merge 1 commit intoopencontainers:masterfrom
zhouhao3 wants to merge 1 commit intoopencontainers:masterfrom
Conversation
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
Member
|
Why should we set this, if a 'type' is empty, it means the template file is invalid, we can drop or ignore it. 'a' is not valid https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#devices |
Contributor
|
On Fri, Apr 28, 2017 at 03:42:14AM -0700, 梁辰晔 (Liang Chenye) wrote:
Why should we set this, if a 'type' is empty, it means the template
file is invalid, we can drop or ignore it. 'a' is not valid
https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#devices
That's the wrong section (you're linking linux.devices).
linux.resources.devices is [1], and explicitly says:
null or unset values mean "all", mapping to a.
Although we should likely drop the ‘null’ from that part of the spec
to catch up with opencontainers/runtime-spec#662. Still, leaving
linux.resources.devices[].type optional makes sense to me.
I'm less sure that we should be replacing it with ‘a’. Why don't we
just leave it alone? Config consumers will have to handle both the
unset case and an explicit ‘a’ anyway, so I don't think we're helping
anyone by filling in the default value here.
[1]: https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#device-whitelist
|
|
Currently, unset case is also valid, let's leave it alone. People may be confused about that his template is changed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://github.com/opencontainers/runtime-spec/blame/master/config-linux.md#L219
Signed-off-by: zhouhao zhouhao@cn.fujitsu.com