Skip to content

Conversation

@Iceber
Copy link
Member

@Iceber Iceber commented Jan 6, 2023

fix: #7923

@k8s-ci-robot
Copy link

Hi @Iceber. 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.

@Iceber Iceber changed the title ctr/run: flag -d and --rm cannot be specified together ctr/run: flags --detach and --rm cannot be specified together Jan 6, 2023
return err
}
if context.Bool("rm") && !detach {
if rm && !detach {
Copy link
Member

@dcantah dcantah Jan 6, 2023

Choose a reason for hiding this comment

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

If we supplied rm we should know detach is false as we'd exit on line 159 now otherwise

Copy link
Member Author

@Iceber Iceber Jan 6, 2023

Choose a reason for hiding this comment

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

Although the upper logic provides some checks, I think the prerequisite for perform defer container.Delete(ctx, containerd.WithSnapshotCleanup) is strict rm && !detach.
For robustness I did not remove the judgment on detach here, what do you think?

Of course, for the sake of code brevity, I think it's fine to just judge rm

Copy link
Member

Choose a reason for hiding this comment

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

It was mainly a nit, so I'm fine with this!

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM w/2 minor nits about the message text. Not critical, but maybe useful to keep messages more terse

@estesp
Copy link
Member

estesp commented Jan 6, 2023

I've re-run the Cirrus CI checks a few times and they continue to fail on the same error, while other PRs are succeeding. The change in this PR is totally unrelated, so I'm not sure why. I do see that the PR branch is 57 commits behind master; do you want to rebase the PR on current HEAD to see if we can get clean CI runs for the Cirrus CI/Vagrant-based runs?

@Iceber
Copy link
Member Author

Iceber commented Jan 7, 2023

/retest

@k8s-ci-robot
Copy link

@Iceber: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

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.

@Iceber
Copy link
Member Author

Iceber commented Jan 7, 2023

I rebase the upstream/main and the latest failed test CI / Windows Integration (windows-2022, sandboxed) is not related to change

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit 54ec191 into containerd:main Jan 9, 2023
@samuelkarp samuelkarp added cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch and removed cherry-pick/1.6.x labels Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

ctr run --detach causes --rm to have no effect

5 participants