CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Adds support for Windows ArgsEscaped images #6479
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
Hi @jterry75. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Should resolve: #5067 |
@thaJeztah - Know its been ages since you have thought about this problem :). But mind taking a look as well? |
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.
Looks good to me. I personally prefer to have that in OCI Image Spec for interoperability. The last time, @kevpar opened and closed the issue. So it wasn't really discussed much.
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.
LGTM; reasoning makes sense.
But I agree it makes sense to re-open the image-spec discussion in the OCI if this is the long-term direction/solution for this on Windows.
I actually already made the carry of the image spec changes and then decided to do it this way I'll open that PR right now. Maybe we can just get this formally supported in OCI and then we don't have to hack it here. It will be the exact same solution just wont need the |
Our current thinking internally was that So I would suggest we consider that for the image spec change, rather than reviving my old PR. :) |
By the way, thanks @jterry75 for working on this! |
I saw the ping, but haven't had time yet to read up (will try to if still needed); I do recall indeed that this was a bit "hairy", and a bit of a hack. |
From the implementations' standpoint, it would be great if following OCI Image Spec assures that existing container images work as expected. I see the Image Spec as a "retro" spec like HTML5, rather than an aspiring new standard like XHTML. So while I don't have strong opinions regarding |
I'm ok with continuing to drive |
I'm fine having OCI discussions later. |
oci/spec_opts.go
Outdated
type imageExtended struct { | ||
Config imageConfigExtended `json:"config,omitempty"` | ||
} | ||
|
||
// WithImageConfigArgs configures the spec to from the configuration of an Image with additional args that | ||
// replaces the CMD of the image | ||
func WithImageConfigArgs(image Image, args []string) SpecOpts { |
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.
It looks like WithImageConfigArgs
is not used by CRI. I think we would need a similar change here as well.
I like the idea of adding @jterry75 I'll give this more of a look on Monday. /ok-to-test |
Sounds like a plan! |
BTW would this fix #6300? |
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.
Some random thoughts / suggestions π
f032016
to
124dde3
Compare
@kevpar - Still need to look at CRI WithProcessArgs you left. But this fixes all of @thaJeztah's comments. |
@kevpar - Turns out this is quite complicated to fix for CRI. There are two entrypoints for CRI via for I looked at instead trying to do this by updating the callers to use
And CRI should in theory be able to say:
You get the idea, but this will be a very large change to do in this PR. |
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.
LGTM (but it's related to windows things, so won't hurt to have more eyes π€)
Thanks for making the changes π
Anything else needed here? Would love to get this in if no objections. Thanks |
124dde3
to
87afb83
Compare
Ok, @kevpar - We now have a test case for every combination of Entrypoint, Cmd, Args for both ArgsEscaped==false (the normal, sane, supported, actually good, way), and ArgsEscaped==true (the ...). I believe this mirrors Docker behavior and solves the problem for the exact same set of cases Docker supports. Plz take one final look |
I think my only final feedback is we should probably add a comment summarizing the discussion/design decisions that went into this. Since from looking at it it's pretty unintuitive what it's doing and why. |
Build succeeded.
|
87afb83
to
4fec5ea
Compare
Done. |
Build succeeded.
|
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.
LGTM. Test failure appears unrelated.
@kzys @thaJeztah @estesp would one of you mind re-reviewing? The logic has changed quite a bit. |
Adds support for Windows container images built by Docker that contain the ArgsEscaped boolean in the ImageConfig. This is a non-OCI entry that tells the runtime that the Entrypoint and/or Cmd are a single element array with the args pre-escaped into a single CommandLine that should be passed directly to Windows rather than passed as an args array which will be additionally escaped. Signed-off-by: Justin Terry <jlterry@amazon.com>
4fec5ea
to
de3d999
Compare
Build succeeded.
|
IT MERGED!!!!!! Thanks all |
Adds support for Windows container images built by Docker
that contain the ArgsEscaped boolean in the ImageConfig. This
is a non-OCI entry that tells the runtime that the Entrypoint
and/or Cmd are a single element array with the args pre-escaped
into a single CommandLine that should be passed directly to
Windows rather than passed as an args array which will be
additionally escaped.
Signed-off-by: Justin Terry jlterry@amazon.com