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

[release/1.7] Don't block snapshot garbage collection on Remove failures #9482

Merged
merged 1 commit into from Dec 8, 2023

Conversation

ambarve
Copy link
Contributor

@ambarve ambarve commented Dec 6, 2023

If a snapshot removal fails (during garbage collection), the entire garbage collection operation is cancelled. This is problematic because once cleanup of any snapshot fails no other snapshots will be cleaned and the disk usage will just keep increasing.
Solution is to return snapshot removal errors wrapped as "ErrFailedPrecondition" errors. The garbage collectors continues cleanup if the error is of this type.

(cherry picked from commit ad96fde)

@k8s-ci-robot
Copy link

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

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.

@dmcgowan dmcgowan changed the title [release/1.7] [Backport] Don't block snapshot garbage collection on Remove failures [release/1.7] Don't block snapshot garbage collection on Remove failures Dec 7, 2023
@dmcgowan
Copy link
Member

dmcgowan commented Dec 7, 2023

@ambarve The project check doesn't like something and it isn't clear what. I see the commit parent is a really old commit, can you try rebasing on release/1.7 HEAD and see if that fixes it?

If a snapshot removal fails (during garbage collection), the entire garbage collection operation is
cancelled. This is problematic because once cleanup of any snapshot fails no other snapshots will be cleaned
and the disk usage will just keep increasing.
Solution is to return snapshot removal errors wrapped as "ErrFailedPrecondition" errors. The garbage
collectors continues cleanup if the error is of this type.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
(cherry picked from commit ad96fde)
Signed-off-by: Amit Barve <ambarve@microsoft.com>
Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid fuweid merged commit de6d8a8 into containerd:release/1.7 Dec 8, 2023
47 checks passed
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.

None yet

5 participants