overwrite the 'platform' value when 'host-specific' was set#415
Merged
hqhq merged 1 commit intoopencontainers:masterfrom Jul 6, 2017
Merged
overwrite the 'platform' value when 'host-specific' was set#415hqhq merged 1 commit intoopencontainers:masterfrom
hqhq merged 1 commit intoopencontainers:masterfrom
Conversation
Member
Author
|
I think 'platform' should be moved to 'validate' sub command, but not the global command. |
Mashimiao
reviewed
Jul 6, 2017
man/oci-runtime-tool.1.md
Outdated
|
|
||
| **--platform** | ||
| Platform the tool targets. | ||
| Platform the tool targets. It will be overwritten by the host platform if '--host-specific' was set. |
There was a problem hiding this comment.
Should we clearly says valid values and default value in manpage?
Member
Author
There was a problem hiding this comment.
You are right, updating on it.
…fic' was set Signed-off-by: liangchenye <liangchenye@huawei.com>
Member
Author
|
updated, PTAL @Mashimiao |
Contributor
Contributor
|
On Thu, Jul 06, 2017 at 03:37:31AM +0000, 梁辰晔 (Liang Chenye) wrote:
I think 'platform' should be moved to 'validate' sub command, but
not the global command.
I think we should move it back to being a global option. generate.New
does not currently take a platform argument [1] and it assumes Linux
[2,3], but both of those seem like oversights to me. I'd certainly
expect future users to be interested in generating new Solaris and
Windows configs, especially if config-generation is what we use for
runtime testing [4].
[1]: https://github.com/opencontainers/runtime-tools/blob/0d35fc8437ec8292cd7065e332000c584f7024c5/generate/generate.go#L33-L34
[2]: https://github.com/opencontainers/runtime-tools/blob/0d35fc8437ec8292cd7065e332000c584f7024c5/generate/generate.go#L52
[3]: https://github.com/opencontainers/runtime-tools/blob/0d35fc8437ec8292cd7065e332000c584f7024c5/generate/generate.go#L181
[4]: https://github.com/opencontainers/runtime-tools/blob/0d35fc8437ec8292cd7065e332000c584f7024c5/validation/validation_test.go#L80
|
Member
Author
|
I removed it for 'generate command' for two reasons:
|
Contributor
|
On Tue, Jul 11, 2017 at 01:26:25PM +0000, 梁辰晔 (Liang Chenye) wrote:
1. I think it is OK for a config file to have both 'Window specific
config' or 'Linux specific config'. The runtime-spec does not
forbid it.
I agree that this is legal (with rc6). I'm not convinced it would
make a useful default template.
2. I'm afraid it will be too complicated to have
'platform/template/other single option' in 'generate command'.
If user want to have 'Windows' configs, I suggest they should:
1) use 'Windows template'
Then why provide generate.New at all? Just provide NewFromSpec,
NewFromFile, and NewFromTemplate, and let all users supply their own
template.
2) add 'Windows unique' options so the 'generate' will add 'Window
Specific Config' automatically.
The default template currently sets process.user [1], but that's
optional on Windows [2]. Would folks generating Windows configs that
did not supply their own template have to set a --process-user-remove
option or some such?
Would they have to explicitly set process.cwd to override the
POSIX-centric default value [3]? Even in #379 (as it currently stands
with da5029b), the process.cwd default is POSIX-centric [4].
[1]: https://github.com/opencontainers/runtime-tools/blob/15ec1df3f6607f4223ab3915547c184cf60a30dd/generate/generate.go#L43
[2]: https://github.com/opencontainers/runtime-spec/blame/v1.0.0-rc6/config.md#L311
[3]: https://github.com/opencontainers/runtime-tools/blob/15ec1df3f6607f4223ab3915547c184cf60a30dd/generate/generate.go#L51
[4]: https://github.com/opencontainers/runtime-tools/pull/379/files#diff-ed9e41f69ceb4f9d141e2fe7a9da68a4R42
|
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.
Signed-off-by: liangchenye liangchenye@huawei.com