runtime-tools
runtime-tools copied to clipboard
generate: output minimal template in default
The runtime-spec doesn't say process in container should have such default capabilities, so remove them.
Signed-off-by: Ma Shimiao [email protected]
On Wed, May 10, 2017 at 07:36:08PM -0700, Ma Shimiao wrote:
The runtime-spec doesn't say process in container should have such default capabilities, so remove them.
‘generate’ is not about spec compliance (that's ‘validate’), it's about creating a useful starting point for users. So runtime-tools maintainers are free to do whatever they like in ‘New()’ if they think it makes life easier for folks who don't have existing opinions about what they want in the spec.
On 05/11/2017 01:19 PM, W. Trevor King wrote:
‘generate’ is not about spec compliance (that's ‘validate’), it's about creating a useful starting point for users.
Agree. But I think we can't make sure which capability is necessary for user, just leave it alone without default value will be better.
On Wed, May 10, 2017 at 10:53:14PM -0700, Ma Shimiao wrote:
But I think we can't make sure which capability is necessary for user, just leave it alone without default value will be better.
I agree, but with that approach the best default config is probably the minimal one for the platform (e.g. 1) with the additional recommended mounts 2. The current default is really somewhere between “useful for newcomers out of the box” and “demonstrates a bunch of things so you can trim it down”. The latter goal is also served by 3, so maybe this PR is the first stage of a pivot towards a more minimal default?
In my own opinion, generate should output config info based on what runtime-spec minimally request in default. Any optional or additional fields in config should be specified by users which may be by options of command generate.
On Thu, May 11, 2017 at 12:44:47AM -0700, Ma Shimiao wrote:
In my own opinion,
generateshould output config info based on what runtime-spec minimally request in default.
So why is this PR just trimming the capabilities? If the goal is minimal (including the SHOULD-level mounts 1?), you could work up a much bigger cut pretty quickly. Are there future plans for that and some reason that taking this one group of properties at a time?
Before I sent this PR, I haven't think so much about minimal or not. I just found the default caps will cause runtimetest fails, so began to fix it.
We can use templates for minimal.
@wking @mrunalp PTAL
@wking @mrunalp @hqhq @liangchenye PTAL
With this title 'output minial tempalte in default', I prefer to provide template file for 'linux/windows/solaris' directly, just like: https://github.com/opencontainers/runtime-spec/tree/master/schema/test/config/good
Maybe we can add them to runtime-tools/contrib/templates?
Agree, we can supply default good templates. But I think without users' spcified options, generate outputs minimal template is also right.