-
Notifications
You must be signed in to change notification settings - Fork 550
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
examples/exec: Describe how to emulate 'exec' with 'start' #391
Conversation
Also, this will need links from somewhere more central ( |
dbaf8f9
to
3617d28
Compare
Spun off from discussion here [1]. There seemed to be consensus that we need something like this but that it should be its own pull request [2,3,4]. [1]: opencontainers#388 (comment) [2]: opencontainers#388 (comment) [3]: opencontainers#388 (comment) [4]: opencontainers#388 (comment) Signed-off-by: W. Trevor King <[email protected]>
-1 I don't think we need to describe this, people can implement exec however we want and we don't want to talk about exec at all in the spec. |
@crosbymichael perhaps the spec, as a formal RFC2119 type of doc, isn't the right spot, but would you be ok with a side-doc, more like a whitepaper? Just something to provide some guidance/hints/... |
@duglin ya, for one the spec is not the right place, somewhere else would be better for sure but the whole reason why exec is out is because people want to implement it in 1000 different ways to fit their need so we don't really need a suggestion at all but if we do have one, it should be outside of the spec. |
On Mon, May 02, 2016 at 11:08:30AM -0700, Michael Crosby wrote:
I agree on “however they want”, but I think describing at least one So I'm fine having these docs land in a separate, non-spec location, |
|
On Mon, May 02, 2016 at 11:22:19AM -0700, Michael Crosby wrote: Exec can be implemented as running additional containers. and then later 2: We need blessed cookbook for the Spec. I think we can handle examples/cookbook etc. after this PR. so I think there is at least some consensus around: a. exec-like functionality being supported via a ‘start’ invocation, and I agree that the cookbook would be informative, and not normative, but |
I agree with Michael Crosby! Having one single example for exec in the Spec is not |
On Mon, May 02, 2016 at 11:56:42AM -0700, Vish Kannan wrote:
A separate repo sounds fine to me, although you probably want Although that seems like an orthogonal concern to number of examples. |
Add tooling to translate higher-level configs into the basic OCI config. On IRC, Julz floated a linux.namespaces[].fromContainer as a higher-level version of linux.namespaces[].path for emulating exec [1]. That makes sense to me, and Mrunal is open to something like [2]: $ ocitools generate --template=high-level-config.json --translate=fromContainer --runtime=runc This commit still needs: * The state JSON lookup and path logic from [3]. * A way to convert the interface{} to an rspec.Spec (the current FIXME raises: FATA[0000] translated template has an invalid schema). [1]: http://ircbot.wl.linuxfoundation.org/eavesdrop/%23opencontainers/%23opencontainers.2016-04-27.log.html#t2016-04-27T20:32:09 [2]: http://ircbot.wl.linuxfoundation.org/eavesdrop/%23opencontainers/%23opencontainers.2016-04-28.log.html#t2016-04-28T16:12:48 [3]: opencontainers/runtime-spec#391 Signed-off-by: W. Trevor King <[email protected]>
Add tooling to translate higher-level configs into the basic OCI config. On IRC, Julz floated a linux.namespaces[].fromContainer as a higher-level version of linux.namespaces[].path for emulating exec [1]. That makes sense to me, and Mrunal is open to something like [2]: $ ocitools generate --template=high-level-config.json --translate=fromContainer --runtime=runc The interface{} -> rspec.Spec conversion happens through a JSON serialization trick suggested by 梁辰晔 (Liang Chenye) [3] after the translations, because before the translations the template may contain JSON that's not represented in the OCI Spec structure (e.g. fromContainer in namespace entries). This commit still needs: * The state JSON lookup and path logic from [4]. * Adjustments to setupNamespaces to avoid clobbering the template. [1]: http://ircbot.wl.linuxfoundation.org/eavesdrop/%23opencontainers/%23opencontainers.2016-04-27.log.html#t2016-04-27T20:32:09 [2]: http://ircbot.wl.linuxfoundation.org/eavesdrop/%23opencontainers/%23opencontainers.2016-04-28.log.html#t2016-04-28T16:12:48 [3]: opencontainers#54 (comment) [4]: opencontainers/runtime-spec#391 Signed-off-by: W. Trevor King <[email protected]>
Add tooling to translate higher-level configs into the basic OCI config. On IRC, Julz floated a linux.namespaces[].fromContainer as a higher-level version of linux.namespaces[].path for emulating exec [1]. That makes sense to me, and Mrunal is open to something like [2]: $ ocitools generate --template=high-level-config.json --translate=fromContainer --runtime=runc The interface{} -> rspec.Spec conversion happens through a JSON serialization trick suggested by 梁辰晔 (Liang Chenye) [3] after the translations, because before the translations the template may contain JSON that's not represented in the OCI Spec structure (e.g. fromContainer in namespace entries). This commit still needs: * The state JSON lookup and path logic from [4]. * Adjustments to setupNamespaces to avoid clobbering the template. [1]: http://ircbot.wl.linuxfoundation.org/eavesdrop/%23opencontainers/%23opencontainers.2016-04-27.log.html#t2016-04-27T20:32:09 [2]: http://ircbot.wl.linuxfoundation.org/eavesdrop/%23opencontainers/%23opencontainers.2016-04-28.log.html#t2016-04-28T16:12:48 [3]: opencontainers#54 (comment) [4]: opencontainers/runtime-spec#391 Signed-off-by: W. Trevor King <[email protected]>
Like @vishh and I said, we do not that things like this should belong in the spec, nor the spec repo. We can wait until a post 1.0 before looking at different use cases and making a contrib or "cookbook" type repo if that fits or there are many other places for this type of content outside of OCI. |
In today's meeting the earlier reasons for closing this were
before supporting runC in my examples. If I get a new ccon release |
Spun off from discussion in #388. There seemed to be
consensus that we need something like this but that it should be its
own pull request.
I've left off the PID-namespaces in state JSON bit until that
thread gets sorted out, but the “look things up in /proc” approach
isn't very robust without it.
I'd also be really happy to make all of
root
optional.Requring a value so the runtime can ignore it seems like a
potential source of user confusion.
It also feels a bit strange to have to give the exec'ing
start
acontainer ID, even though this join-only config isn't actually setting
up a sub-sandbox. But short of externalizing the state registry,
I don't see an easy way around that.