runtime: Document args[0] and the no-usable-args fallback#118
runtime: Document args[0] and the no-usable-args fallback#118wking wants to merge 1 commit intoopencontainers:masterfrom
Conversation
runtime.md
Outdated
There was a problem hiding this comment.
I think we should use [] instead of null
null is confusing/misleading here, and "args" : null is invalided in the config.
There was a problem hiding this comment.
On Wed, Aug 26, 2015 at 06:16:33PM -0700, Lai Jiangshan wrote:
+If the
argsfield is missing, empty, ornull, the runtime will use[path].I think we should use
[]instead ofnull.nullis
confusing/misleading here, and"args" : nullis invalided in the
config.
The docs are about the JSON, where ‘null’ should be a non-confusing
value. I'd intended “empty” to mean ‘[]’ and “missing” to mean “no
‘args’ key in the object.”. I think all of those should be mapped to
‘[path]’, although if someone else felt very strongly about it I'd be
ok with ‘[]’ being mapped to ‘[]’, and just letting folks who specify
empty values deal with the fallout for programs that assume argv[0]
exists.
|
We really need to clarify this. Re-reading this section it is unclear what |
|
The comments on #34 clarify the use case of path to some degree but it still doesn't make sense to me. |
|
On Wed, Aug 26, 2015 at 10:19:35PM -0700, Brandon Philips wrote:
If we want a template for a more specific description, execve(2)'s
The path and args[0] are not the same thing. For example, busybox { |
|
Ehhh, I don't think we need this level of flexibility. If a plugin intends to be invoked with a different arg0 it should symlink itself to that path. |
|
@philips I am okay either ways. @LK4D4 @crosbymichael any thoughts? |
|
On Thu, Aug 27, 2015 at 01:50:11PM -0700, Brandon Philips wrote:
That's what BusyBox usually does, but thte #34 comments were for |
|
I really don't think we should bend over backwards for this arg0 use case which I would argue breaks good practice and convention. |
|
On Sat, Aug 29, 2015 at 08:30:18AM -0700, Brandon Philips wrote:
I don't think it's bending all that far backward to support the { instead of: {
I don't see any problem with “good practice” here. Switching on If we're looking for other possible conventions, Python requires args { and: { That way only folks who need to override args[0] would need to set |
|
@crosbymichael @LK4D4 Are you okay going back to a simple args array for this? |
|
On Tue, Sep 08, 2015 at 10:32:30AM -0700, Mrunal Patel wrote:
What's the simple args array? Possible APIs that I'm aware of are: a. ‘path’ is required, and ‘[path] + args…’ is the executed argv (this Are you suggesting (d)? Why prefer that over (c)? |
|
I'm in favor of |
|
On Wed, Sep 09, 2015 at 11:27:53AM -0700, Daniel, Dao Quang Minh wrote:
Just in case it's hidden too deeply in 1, that's my current favorite |
|
Lets just leave it the way it is now because we already had this discussion in the original PR and decided on this. |
|
On Wed, Sep 09, 2015 at 03:03:27PM -0700, Michael Crosby wrote:
(c) wasn't discussed in opencontainers/runc#160 and @philips (who's |
|
Is it broken staying the way it is?
|
|
@wking i cannot understand your footnotes and (a,b,c) points so let others speak for themselves because its hard to follow along and have a conversation with another person on this repo when u have a comment inbetween everyone else during a discussion. |
|
On Wed, Sep 09, 2015 at 03:20:49PM -0700, Vincent Batts wrote:
It's workable but redundant with the current required path approach. |
|
I'm fine with any changes, keeping it the same, just args, whatever, we just need to be able to have a constructive discussion and let everyone voice their concerns then think about a way to resolve them without alot of noise on the issue while people consider the approaches of the proposed solutions. |
|
On Wed, Sep 09, 2015 at 03:21:00PM -0700, Michael Crosby wrote:
Those are references to my summary of possible APIs 1
I try to @mention folks and link to my sources when I paraphrase
|
|
let's not do this for now. I realize there is a gap in C vs golang approach to this, but args is clearly args presently. |
|
On Fri, Sep 11, 2015 at 10:19:25AM -0700, Vincent Batts wrote:
The examples as they're currently written suggest the (a) API 1. I |
This follows Python's API, which has 'args' and 'executable' (our PATH) for Popen [1]). That allows most users (who don't need to distinguish between args[0] and the executable path) to just use args, while still providing a means to make that distinction (set 'path') for folks who do need it. This restores the ability to explicitly set args[0] independent of the path, which was requested in opencontainers#34 [2] and ack-ed by Micheal [3] and Mrunal [4], but didn't match the examples that landed with opencontainers#34. [1]: https://docs.python.org/3/library/subprocess.html#subprocess.Popen [2]: opencontainers#34 (comment) [3]: opencontainers#34 (comment) [4]: opencontainers#34 (comment) Signed-off-by: W. Trevor King <wking@tremily.us>
|
but wait. this new commit is more variadic.. :-\ |
|
I see three maintainers say no to this including myself. Closing so we can move on. |
|
On Fri, Sep 11, 2015 at 12:01:11PM -0700, Michael Crosby wrote:
Just to summarize pushback against the current proposal (4e5c9d4),
This last point seems to be the only technical pushback that the
So I may be just misunderstanding either the “variadic” phrasing or I'm fine postponing this discussion until some future date 11, if |
Leaning on Go's docs:
for the fallback wording.
This restores the ability to explicitly set
args[0]independent of thepath, which was requested in #34 and ack-ed by Micheal and
Mrunal, but didn't match the examples that landed with #34.
This new wording matches the implementation that's currently in flight
as opencontainers/runc#160. I also raised this issue on the mailing
list, but didn't have any discussion there before we reached a
consensus in the runC PR.