-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add a 'start' command #210
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
|
code LGTM I'm not sure about |
|
On Mon, Aug 17, 2015 at 06:34:52PM -0700, Doug Davis wrote:
In #200, I've been arguing that we should handle this sort of thing by For an example with a hard-coded command replacement, see config.json |
|
And I haven't compared the backing code to see if the intended |
|
@wking oops, I didn't notice #205 but he did it slightly differently because it still keeps the existing code, which means there's a bit of duplication. @tonistiigi am I reading your PR correctly? If so, I'm ok with closing this PR if you want to remove the dup code in ours. Thoughts? |
|
Also, @tonistiigi I think you'll need to update the help/docs too if we go with your PR. w.r.t #200 I think that's a slightly different usecase. I view that as trying to manipulate, or inject, data into the processing of a new container (which I like the idea of), but this PR is more at a higher level because its about just asking for runc to even start a container, not what happens after that. |
|
On Tue, Aug 18, 2015 at 09:04:31AM -0700, Doug Davis wrote:
Ah, I'd misread your initial post's “means 'foo' is the name of … an which would give us a uniform syntax for overriding the config file |
|
@wking totally agree and was going to issue a PR for that later on - but one step at a time :-) |
|
@duglin we seem to be implementing different functionality with the same name. My PR is for |
|
@tonistiigi ah totally missed that. And 'exec' is better for yours than mine. So let me rename mine to 'start' per @dqminh's comment. Thanks for the clarification. |
|
In context of runc, |
|
On Tue, Aug 18, 2015 at 09:31:56AM -0700, Tõnis Tiigi wrote:
Maybe distinguish by using ‘start’ here 1 and ‘enter’ (echoing |
|
made the 'exec' -> 'start' change. |
|
On Tue, Aug 18, 2015 at 09:35:43AM -0700, Daniel, Dao Quang Minh wrote:
No? One means “create new namespaces, cgroups, mounts, etc. and |
|
well, if we think we may want to have a 'create' command at some point, which does seem to make sense, then 'start' for create+start doesn't seem right since 'start' should be to start an existing container. |
|
On Tue, Aug 18, 2015 at 09:55:49AM -0700, Doug Davis wrote:
If we get a ‘create’ command, I'd just drop the “create and exec” $ runc create && runc exec or: $ runc --config config.json create && runc --config config.json exec
I floated ‘enter’ earlier too 1, but you're probably right about |
|
I was afraid you'd suggest that :-) While from a dev perspective having it be two commands works, I think dropping the UX benefit of merging the two would probably be a mistake. |
|
On Tue, Aug 18, 2015 at 10:05:06AM -0700, Doug Davis wrote:
This is probably food for the mailing list. This PR looks good to me |
|
On Tue, Aug 18, 2015 at 10:27:47AM -0700, W. Trevor King wrote:
I spun off the larger “do we want a runtime-user API specification, |
|
@codegangsta From codegangsta/cli.git In the runc side, should we treat FOO as non-subcommand in this case. thus we can use |
|
@laijs yea but that's kind of funky. |
|
I'd like to have this considered as is, with "start". We can always rename it later on if we decide we want to change it. |
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.
why did you still leave this here?
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 didn't want to break existing functionality - meaning "runc" by itself. I believe this line makes it default to "start" if no command is given. Is that not correct?
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.
yep, just checking. we could probably remove it soon right? maybe in the docs not have the runc example without using runc start
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.
yep we could if the long-term direction is to always require an 'action' verb. Want me to update the docs to always show an action?
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.
ya
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.
ok done!
README.md
Outdated
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.
This could maybe be “To run a container, execute runc start in the bundle's root directory:”, since we don't want just runc.
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.
works for me. done
README.md
Outdated
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.
“diectory” → “directory”.
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.
geez I need spell check - thanks.
When any non-global-flag parameter appears on the command line make sure there's a "command" even in the 'start' (run) case to ensure its not ambiguous as to what the arg is. For example, w/o this fix its not clear if runc foo means 'foo' is the name of a config file or an unknown command. Or worse, you can't name a config file the same a ANY command, even future (yet to be created) commands. We should fix this now before we ship 1.0 and are forced to support this ambiguous case for a long time. Signed-off-by: Doug Davis <[email protected]>
|
LGTM |
1 similar comment
|
LGTM |
Cleanup bundle.md
Because:
1. This section defines the configuration format, and doesn't need to
be tied to a particular filename.
2. The bundle spec (in bundle.md) already has:
This REQUIRED file MUST reside in the root of the bundle
directory and MUST be named `config.json`.
The config.md line may have been useful when it was added (77d44b1,
Update runtime.md, 2015-07-16). But since the bundle.md line landed
in 106ec2d (Cleanup bundle.md, 2015-10-02, opencontainers#210), I think it's been
redundant.
Signed-off-by: W. Trevor King <[email protected]>
When any non-global-flag parameter appears on the command line make sure
there's a "command" even in the 'start' (run) case to ensure its not
ambiguous as to what the arg is. For example, w/o this fix its not
clear if
means 'foo' is the name of a config file or an unknown command. Or worse,
you can't name a config file the same as ANY command, even future (yet to
be created) commands.
We should fix this now before we ship 1.0 and are forced to support this
ambiguous case for a long time.
Signed-off-by: Doug Davis [email protected]