Skip to content

Conversation

@kiashok
Copy link
Contributor

@kiashok kiashok commented Mar 10, 2023

This PR cherry picks commit for argsEscaped support in CRI from containerd/main to release/1.6 branch + updates image-spec version to include the changes for ArgsEscaped support in OCI + git mod tidy/vendor + cherry-pick e0b817e which has some small test fixes (function name change) from main to release/1.6

This commit adds supports for the ArgsEscaped
value for the image got from the dockerfile.
It is used to evaluate and process the image
entrypoint/cmd and container entrypoint/cmd
options got from the podspec.

(cherry picked from commit 8137e41)

@k8s-ci-robot
Copy link

Hi @kiashok. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@dcantah
Copy link
Member

dcantah commented Mar 13, 2023

Should we just cherry-pick these over to 1.6 as well? Then we'd get the image spec bump for free and would get Justin's work:

  1. de3d999
  2. d4b9dad

So Justin's two commits, and then your CRI work. wdyt?

@kiashok kiashok force-pushed the port-gracefulterminationFix branch from 4a43b1f to f2cbd7a Compare March 13, 2023 22:27
Copy link
Member

@kzys kzys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @dcantah, but I'm fine to have them in a separate PR.

@kiashok
Copy link
Contributor Author

kiashok commented Mar 15, 2023

Should we just cherry-pick these over to 1.6 as well? Then we'd get the image spec bump for free and would get Justin's work:

  1. de3d999
  2. d4b9dad

So Justin's two commits, and then your CRI work. wdyt?

Sure I can send out separate PRs for these two commits

@kiashok
Copy link
Contributor Author

kiashok commented Mar 21, 2023

@mikebrow could you please take a look at the changes if you have some time? :)

@dims
Copy link
Member

dims commented Mar 29, 2023

/ok-to-test

1 similar comment
@samuelkarp
Copy link
Member

/ok-to-test

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

action(t, cn, containerConfig)
}

func startAndTestContainer(t *testing.T, sb string, sbConfig *runtime.PodSandboxConfig, cnConfig *runtime.ContainerConfig) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createStartStopAndRemoveTestContainer :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with no pause at all between the start and stop steps not sure if you'll be letting the container run or not.. will be time and scheduling dependent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I am able to repro the window after start container where the container is not already running and we have killed it. Looks like StartContainer() is a synchronous call as well. Can add an assert after run to make sure the state of container is expected. Thoughts @dcantah @kzys ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is a pain for sure.. typically one needs to have a probe waiting on some known state value in the container or just pause sufficient time after start returns

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the 5 sec delay added in PR #8359 is good enough for this test

@mikebrow
Copy link
Member

apologies for code review against the cherry pick... maybe open issue on main and back port.. then cherry both to 1.6?

@estesp
Copy link
Member

estesp commented Mar 29, 2023

I'm guessing this PR should be closed? The cherry-pick from the already merged change in main is #8306 and is ready to merge for release/1.6 and does not have the test changes you commented on.

@mikebrow
Copy link
Member

I'm guessing this PR should be closed? The cherry-pick from the already merged change in main is #8306 and is ready to merge for release/1.6 and does not have the test changes you commented on.

thx was just plowing through review requests and missed the replace change

@dcantah
Copy link
Member

dcantah commented Mar 29, 2023

I think the status here is that this change solves this ArgsEscaped problem for CRI, whereas Justin had made some changes to fix this for containerd clients (client options, and in the OCI image spec) that would be nice to get in as well. I almost forgot how this played out.

One of two of Justin's changes has been backported already: #8273.

And @kiashok has an open change for the second (removes a workaround Justin had before he got this field into the image spec itself): #8306

@kiashok Let me know if that's not correct 🫠.

@kiashok
Copy link
Contributor Author

kiashok commented Mar 29, 2023

I think the status here is that this change solves this ArgsEscaped problem for CRI, whereas Justin had made some changes to fix this for containerd clients (client options, and in the OCI image spec) that would be nice to get in as well. I almost forgot how this played out.

One of two of Justin's changes has been backported already: #8273.

And @kiashok has an open change for the second (removes a workaround Justin had before he got this field into the image spec itself): #8306

@kiashok Let me know if that's not correct 🫠.

Yes this is right! :) Thanks Danny!

@dmcgowan
Copy link
Member

This needs a rebase

@kiashok kiashok mentioned this pull request Apr 5, 2023
@kiashok
Copy link
Contributor Author

kiashok commented Apr 5, 2023

apologies for code review against the cherry pick... maybe open issue on main and back port.. then cherry both to 1.6?

@mikebrow I submitted a PR against main branch to address the review comments -#8359 . Could you please take a look?

@kiashok
Copy link
Contributor Author

kiashok commented Apr 14, 2023

This needs a rebase

This PR is waiting on #8359 to be checked in. Will bring in those changes as well and rebase once it goes in

@kiashok
Copy link
Contributor Author

kiashok commented Apr 17, 2023

apologies for code review against the cherry pick... maybe open issue on main and back port.. then cherry both to 1.6?

Hi @mikebrow , changes were checked into main with commit e0b817e . Cherry-picked the same and updated this PR. Could you please take a look?

Kirtana Ashok added 2 commits April 17, 2023 16:56
This commit adds supports for the ArgsEscaped
value for the image got from the dockerfile.
It is used to evaluate and process the image
entrypoint/cmd and container entrypoint/cmd
options got from the podspec.

Signed-off-by: Kirtana Ashok <[email protected]>
(cherry picked from commit 8137e41)
Signed-off-by: Kirtana Ashok <[email protected]>
- Rename test name
- Add a tag to the container image used in the tests instead of the latest tag
- Add a 5 second delay between container start and stop to ensure that the
  container is fully initialized

Signed-off-by: Kirtana Ashok <[email protected]>
(cherry picked from commit e0b817e)
Signed-off-by: Kirtana Ashok <[email protected]>
@kiashok kiashok force-pushed the port-gracefulterminationFix branch from b1b3ace to bc2e013 Compare April 17, 2023 23:56
@kiashok
Copy link
Contributor Author

kiashok commented Apr 17, 2023

This needs a rebase

This PR is waiting on #8359 to be checked in. Will bring in those changes as well and rebase once it goes in

Updated this PR. Could you please take a look @dmcgowan @kzys ?

@kiashok
Copy link
Contributor Author

kiashok commented Apr 20, 2023

@mikebrow @dcantah @dmcgowan could you please take a look if you have some time?

@kiashok
Copy link
Contributor Author

kiashok commented Apr 20, 2023

@estesp the test failure seen here is unrelated to the change being made -https://github.com/containerd/containerd/actions/runs/4726994245/jobs/8387174524?pr=8247 . Could you please restart the failing test?

@estesp estesp merged commit 97243ae into containerd:release/1.6 Apr 21, 2023
aravindhp added a commit to openshift/containerd that referenced this pull request May 24, 2023
containerd 1.6.21

Welcome to the v1.6.21 release of containerd!

The twenty-first patch release for containerd 1.6 contains various fixes and updates.

* **update runc binary to v1.1.7 ([containerd#8450](containerd#8450))
* **Remove entry for container from container store on error ([containerd#8456](containerd#8456))
* **oci: partially restore comment on read-only mounts for uid/gid uses ([containerd#8403](containerd#8403))
* **windows: Add ArgsEscaped support for CRI ([containerd#8247](containerd#8247))
* **oci: Use WithReadonlyTempMount when adding users/groups ([containerd#8357](containerd#8357))
* **archive: consistently respect value of WithSkipDockerManifest ([containerd#8345](containerd#8345))

See the changelog for complete list of changes

Please try out the release binaries and report any issues at
https://github.com/containerd/containerd/issues.

* Derek McGowan
* Sebastiaan van Stijn
* Iceber Gu
* Kirtana Ashok
* Justin Chadwell
* Phil Estes
* Akihiro Suda
* Djordje Lukic
* Kazuyoshi Kato
* Mike Brown
* Wei Fu
* kiashok

<details><summary>26 commits</summary>
<p>

* [release/1.6] Prepare release notes for v1.6.21  ([containerd#8463](containerd#8463))
  * [`9226c362a`](containerd@9226c36) Add release notes for v1.6.21
* [release/1.6] update go to go1.19.9 ([containerd#8469](containerd#8469))
  * [`39566aade`](containerd@39566aa) [release/1.6] update go to go1.19.9
* [release/1.6] fix the task setting the runtime path ([containerd#8454](containerd#8454))
  * [`e8840f688`](containerd@e8840f6) skip TestContainerStartWithAbsRuntimePath if the runtime is v1
  * [`75ab094de`](containerd@75ab094) integration: add container start test using abs runtime path
  * [`f49254f0b`](containerd@f49254f) WithRuntimePath uses the TaskInfo.RuntimePath field
* [release/1.6 backport] update runc binary to v1.1.7 ([containerd#8450](containerd#8450))
  * [`ccb51ff26`](containerd@ccb51ff) update runc binary to v1.1.7
* [release/1.6] Remove entry for container from container store on error ([containerd#8456](containerd#8456))
  * [`95d31551d`](containerd@95d3155) Remove entry for container from container store on error
* [release/1.6 backport] oci: partially restore comment on read-only mounts for uid/gid uses ([containerd#8403](containerd#8403))
  * [`c33eb574d`](containerd@c33eb57) oci: partially restore comment on read-only mounts for uid/gid uses
* [release/1.6 ] Add ArgsEscaped support for CRI ([containerd#8247](containerd#8247))
  * [`bc2e01303`](containerd@bc2e013) Fix argsEscaped tests
  * [`8b81d5acc`](containerd@8b81d5a) Add ArgsEscaped support for CRI
* [release/1.6 backport] update runc binary to v1.1.6 ([containerd#8385](containerd#8385))
  * [`57d953482`](containerd@57d9534) update runc binary to v1.1.6
* [release/1.6 backport] oci: Use WithReadonlyTempMount when adding users/groups ([containerd#8357](containerd#8357))
  * [`fb5e663d0`](containerd@fb5e663) oci: Use WithReadonlyTempMount when adding users/groups
* [release/1.6] update go to go1.19.8 ([containerd#8353](containerd#8353))
  * [`26efb8fd5`](containerd@26efb8f) [release/1.6] update go to go1.19.8
* [release/1.6] archive: consistently respect value of WithSkipDockerManifest ([containerd#8345](containerd#8345))
  * [`ec13b497e`](containerd@ec13b49) export: add test for WithSkipDockerManifest
  * [`d1f3771c4`](containerd@d1f3771) archive: consistently respect value of WithSkipDockerManifest
</p>
</details>

This release has no dependency changes

Previous release can be found at [v1.6.20](https://github.com/containerd/containerd/releases/tag/v1.6.20)
Mengkzhaoyun pushed a commit to open-beagle/containerd that referenced this pull request Jun 9, 2023
containerd 1.6.21

Welcome to the v1.6.21 release of containerd!

The twenty-first patch release for containerd 1.6 contains various fixes and updates.

* **update runc binary to v1.1.7 ([#8450](containerd/containerd#8450))
* **Remove entry for container from container store on error ([#8456](containerd/containerd#8456))
* **oci: partially restore comment on read-only mounts for uid/gid uses ([#8403](containerd/containerd#8403))
* **windows: Add ArgsEscaped support for CRI ([#8247](containerd/containerd#8247))
* **oci: Use WithReadonlyTempMount when adding users/groups ([#8357](containerd/containerd#8357))
* **archive: consistently respect value of WithSkipDockerManifest ([#8345](containerd/containerd#8345))

See the changelog for complete list of changes

Please try out the release binaries and report any issues at
https://github.com/containerd/containerd/issues.

* Derek McGowan
* Sebastiaan van Stijn
* Iceber Gu
* Kirtana Ashok
* Justin Chadwell
* Phil Estes
* Akihiro Suda
* Djordje Lukic
* Kazuyoshi Kato
* Mike Brown
* Wei Fu
* kiashok
<details><summary>26 commits</summary>
<p>

* [release/1.6] Prepare release notes for v1.6.21  ([#8463](containerd/containerd#8463))
  * [`9226c362a`](containerd/containerd@9226c36) Add release notes for v1.6.21
* [release/1.6] update go to go1.19.9 ([#8469](containerd/containerd#8469))
  * [`39566aade`](containerd/containerd@39566aa) [release/1.6] update go to go1.19.9
* [release/1.6] fix the task setting the runtime path ([#8454](containerd/containerd#8454))
  * [`e8840f688`](containerd/containerd@e8840f6) skip TestContainerStartWithAbsRuntimePath if the runtime is v1
  * [`75ab094de`](containerd/containerd@75ab094) integration: add container start test using abs runtime path
  * [`f49254f0b`](containerd/containerd@f49254f) WithRuntimePath uses the TaskInfo.RuntimePath field
* [release/1.6 backport] update runc binary to v1.1.7 ([#8450](containerd/containerd#8450))
  * [`ccb51ff26`](containerd/containerd@ccb51ff) update runc binary to v1.1.7
* [release/1.6] Remove entry for container from container store on error ([#8456](containerd/containerd#8456))
  * [`95d31551d`](containerd/containerd@95d3155) Remove entry for container from container store on error
* [release/1.6 backport] oci: partially restore comment on read-only mounts for uid/gid uses ([#8403](containerd/containerd#8403))
  * [`c33eb574d`](containerd/containerd@c33eb57) oci: partially restore comment on read-only mounts for uid/gid uses
* [release/1.6 ] Add ArgsEscaped support for CRI ([#8247](containerd/containerd#8247))
  * [`bc2e01303`](containerd/containerd@bc2e013) Fix argsEscaped tests
  * [`8b81d5acc`](containerd/containerd@8b81d5a) Add ArgsEscaped support for CRI
* [release/1.6 backport] update runc binary to v1.1.6 ([#8385](containerd/containerd#8385))
  * [`57d953482`](containerd/containerd@57d9534) update runc binary to v1.1.6
* [release/1.6 backport] oci: Use WithReadonlyTempMount when adding users/groups ([#8357](containerd/containerd#8357))
  * [`fb5e663d0`](containerd/containerd@fb5e663) oci: Use WithReadonlyTempMount when adding users/groups
* [release/1.6] update go to go1.19.8 ([#8353](containerd/containerd#8353))
  * [`26efb8fd5`](containerd/containerd@26efb8f) [release/1.6] update go to go1.19.8
* [release/1.6] archive: consistently respect value of WithSkipDockerManifest ([#8345](containerd/containerd#8345))
  * [`ec13b497e`](containerd/containerd@ec13b49) export: add test for WithSkipDockerManifest
  * [`d1f3771c4`](containerd/containerd@d1f3771) archive: consistently respect value of WithSkipDockerManifest
</p>
</details>

This release has no dependency changes

Previous release can be found at [v1.6.20](https://github.com/containerd/containerd/releases/tag/v1.6.20)
@kiashok kiashok deleted the port-gracefulterminationFix branch June 13, 2023 22:14
@kiashok kiashok restored the port-gracefulterminationFix branch June 13, 2023 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants