-
Notifications
You must be signed in to change notification settings - Fork 141
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
overwrite the 'platform' value when 'host-specific' was set #415
Conversation
I think 'platform' should be moved to 'validate' sub command, but not the global command. |
man/oci-runtime-tool.1.md
Outdated
@@ -33,7 +33,7 @@ oci-runtime-tool is a collection of tools for working with the [OCI runtime spec | |||
Log level (panic, fatal, error, warn, info, or debug) (default: "error"). | |||
|
|||
**--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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we clearly says valid values and default value in manpage?
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.
You are right, updating on it.
…fic' was set Signed-off-by: liangchenye <liangchenye@huawei.com>
updated, PTAL @Mashimiao |
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
|
I removed it for 'generate command' for two reasons:
|
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
|
Signed-off-by: liangchenye liangchenye@huawei.com