-
Notifications
You must be signed in to change notification settings - Fork 3.8k
ctr: fix the cleanup of task #8174
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 @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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
601ef2f to
956b7f4
Compare
cmd/ctr/commands/run/run.go
Outdated
| defer container.Delete(ctx, containerd.WithSnapshotCleanup) | ||
| defer func() { | ||
| if err := container.Delete(ctx, containerd.WithSnapshotCleanup); err != nil { | ||
| logrus.WithError(err).Error("delete container") |
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.
suggest to use failed to cleanup container
cmd/ctr/commands/run/run.go
Outdated
| task.Delete(ctx) | ||
|
|
||
| if _, err := task.Delete(ctx, containerd.WithProcessKill); err != nil && !errdefs.IsNotFound(err) { | ||
| logrus.WithError(err).Error("delete task") |
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.
suggest to use failed to cleanup task
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.
This uses the same style of error message as the rest of the run command, eg. logrus.WithError(err).Error("console resize")
do we need to change the rest together?
|
The message style of In the future I can try to standardize the message style of all @fuweid PTAL |
|
@Iceber please rebase. thanks! |
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
|
@fuweid updated |
|
/retest |
fuweid
left a comment
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
…/main Merge upstream containerd/main at commit 5d1ab01 into ado fork-external/main Related work items: containerd#7944, containerd#8174, containerd#8334, containerd#8362, containerd#8572, containerd#8582, containerd#8588, containerd#8605, containerd#8606, containerd#8617, containerd#8619, containerd#8626, containerd#8627, containerd#8633, containerd#8637, containerd#8641, containerd#8643, containerd#8645, containerd#8652, containerd#8667, containerd#8672, containerd#8673, containerd#8676, containerd#8680, containerd#8684, containerd#8685, containerd#8692, containerd#8696, containerd#8697, containerd#8701, containerd#8708, containerd#8717, containerd#8726, containerd#8728, containerd#8729, containerd#8731, containerd#8732, containerd#8740, containerd#8752, containerd#8758, containerd#8762, containerd#8764
Containers and tasks are not cleaned up when
ctr run --rmexits due to a cni configuration error.