Skip to content
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

integration: init release upgrade testing #9262

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

fuweid
Copy link
Member

@fuweid fuweid commented Oct 18, 2023

RIP legacy CRI in #9228.
The pull request is to init release upgrade testing cases to check sandbox-like CRI implementation is compatible with v1.x release. It's part of #3757

@k8s-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@fuweid fuweid force-pushed the init-upgrade-test branch 6 times, most recently from 171d0e8 to 6c827c4 Compare October 18, 2023 15:41
@fuweid fuweid marked this pull request as ready for review October 18, 2023 15:44
@fuweid fuweid requested review from mxpv, AkihiroSuda and dmcgowan and removed request for mxpv October 18, 2023 15:44
@fuweid fuweid mentioned this pull request Oct 18, 2023
@fuweid fuweid force-pushed the init-upgrade-test branch from 6c827c4 to 72cc895 Compare October 18, 2023 23:41
@fuweid fuweid requested a review from henry118 October 18, 2023 23:42
@fuweid fuweid added this to the 2.0 milestone Oct 19, 2023
metadata/sandbox.go Outdated Show resolved Hide resolved
pkg/cri/server/sandbox_remove.go Outdated Show resolved Hide resolved
Copy link
Member

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

This is pretty neat! A few comments, but I'm generally happy with it.

integration/release_upgrade_linux_test.go Show resolved Hide resolved
integration/release_upgrade_linux_test.go Show resolved Hide resolved
Comment on lines 88 to 89
require.NoError(t, previousProc.kill(syscall.SIGTERM))
require.NoError(t, previousProc.wait())
Copy link
Member

Choose a reason for hiding this comment

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

Maybe a timeout here? Or (see other comment about pdeathsig) have the parent goroutine in a locked OS thread exit, causing SIGKILL to be sent?

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed the wait() to wait(timeout time.Duration). And also add new goroutine to wait for containerd's exit event with locked OS thread. PTAL

integration/release_upgrade_linux_test.go Show resolved Hide resolved
integration/release_upgrade_linux_test.go Outdated Show resolved Hide resolved

// downloadPreviousReleaseBinary downloads the latest version of previous release
// into the target dir.
func downloadPreviousReleaseBinary(t *testing.T, targetDir string) {
Copy link
Member

Choose a reason for hiding this comment

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

We may eventually want a way to supply a local containerd archive instead of downloading one, especially if we want this test to be usable for distros who build their own containerd. But I don't think we need to do that now.

@fuweid fuweid marked this pull request as draft October 20, 2023 07:24
The TestUpgrade downloads the latest of previous release's binary and
use them to setup pods and then use current release to recover the
existing pods.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
@fuweid fuweid force-pushed the init-upgrade-test branch from 72cc895 to 2fab240 Compare November 5, 2023 09:53
@fuweid
Copy link
Member Author

fuweid commented Nov 5, 2023

@samuelkarp Updated with your suggestion. PTAL. Thanks!

The test result is here.
https://github.com/containerd/containerd/actions/runs/6760554704/job/18375351447?pr=9262#step:18:1039

@fuweid fuweid marked this pull request as ready for review November 5, 2023 11:35
Copy link
Member

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

LGTM!

// upgradeVerifyCaseFunc is used to verify the behavior after upgrade.
type upgradeVerifyCaseFunc func(t *testing.T, criRuntimeService cri.RuntimeService)

// TODO: Support Windows
Copy link
Member

Choose a reason for hiding this comment

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

nit: link to #3757 for these TODOs?

Copy link
Member Author

Choose a reason for hiding this comment

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

oops. Just saw this comment. I will add the link in the follow-up. Thanks!

Copy link
Member

@henry118 henry118 left a comment

Choose a reason for hiding this comment

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

LGTM

@samuelkarp samuelkarp added this pull request to the merge queue Nov 9, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 9, 2023
@estesp estesp added this pull request to the merge queue Nov 9, 2023
Merged via the queue into containerd:main with commit 1dd9581 Nov 9, 2023
40 checks passed
@fuweid fuweid deleted the init-upgrade-test branch November 17, 2023 05:12
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.

5 participants