Skip to content

e2e: add upgrade to make sure compatiliblity with 1.x #11761

Closed
yylt wants to merge 2 commits intocontainerd:mainfrom
yylt:s
Closed

e2e: add upgrade to make sure compatiliblity with 1.x #11761
yylt wants to merge 2 commits intocontainerd:mainfrom
yylt:s

Conversation

@yylt
Copy link
Copy Markdown
Contributor

@yylt yylt commented Apr 28, 2025

Fix #11535

Add e2e testing, mainly including the following

  1. Use 1.7.27 to create containers based on containerd-shim runc-v2 and containerd-shim runc-v1
  2. Upgrade to current(2.x) and create a new container on the previously created one to ensure successful creation
  3. Use the current(2.x) to stop and delete the above containers, ensuring success and no resource leaks, such as root file

To ensure the success of e2e, some modifications have been made, roughly as follows

1 rewrite the #11735, as the comment describe, it is also follow-up
2 use clientv2 which the corresponding sandbox is created by 1.x.

@k8s-ci-robot
Copy link
Copy Markdown

Hi @yylt. 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-sigs/prow repository.

@dosubot dosubot Bot added area/cri Container Runtime Interface (CRI) area/runtime Runtime labels Apr 28, 2025
@yylt
Copy link
Copy Markdown
Contributor Author

yylt commented Apr 28, 2025

cc @samuelkarp @mikebrow @mxpv

@yylt yylt force-pushed the s branch 10 times, most recently from d318e61 to 4953164 Compare April 28, 2025 13:55
if !errors.Is(sbErr, errdefs.ErrNotFound) {
return nil, sbErr
}
log.G(ctx).WithField("id", opts.SandboxID).Warning("not found sandbox, maybe created from v1.x")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: "sandbox not found"

shouldv2 bool
)
if opts.SandboxID != "" {
sbx, sbErr := m.sandboxStore.Get(ctx, opts.SandboxID)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For context, is this sandbox store not being used in 1.X? How (or where) are sandboxes stored in those branches?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Here, sandboxStore points to the metadata sandbox, which was introduced in 2.0 through the sandbox API. The creation and update of this part are done in the sandbox_run of cri. see https://github.com/containerd/containerd/blob/1a43cb6a1035441f9aca8f5666a9b3ef9e70ab20/internal/cri/server/sandbox_run.go#L135C1-L137C3

cri create/update both cache and metadata sandbox data structures, which may be the reason for your confusion

@yylt yylt changed the title update shim manager for sandbox e2e: add upgrade to make sure compatiliblity with 1.x May 5, 2025
@fuweid fuweid closed this in #11793 May 6, 2025
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in Pull Request Review May 6, 2025
@yylt yylt deleted the s branch May 7, 2025 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cri Container Runtime Interface (CRI) area/runtime Runtime needs-ok-to-test size/L

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Upgrade test failures on 2.1 beta when upgrading from 1.7 shim

3 participants