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

misc: remove related images/contents/snapshots in cleanup progress #609

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

ChengyuZhu6
Copy link

The cleanup process exits before completion. In addition to snapshots, we also need to clean up related content and images.

Depends on Ryan's PR #605.

@ChengyuZhu6
Copy link
Author

cc @ryansavino

@ryansavino
Copy link
Contributor

I fixed a few things in #605 per review comments. You may want to re-cherrypick the commits.

@ChengyuZhu6
Copy link
Author

I fixed a few things in #605 per review comments. You may want to re-cherrypick the commits.

Done.

for i in $(nsenter -t 1 -m ctr ${ctr_args} list | grep -v KEY | cut -d' ' -f1); do
nsenter -t 1 -m ctr ${ctr_args} rm $i || true
done
remove_images
Copy link
Contributor

Choose a reason for hiding this comment

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

@ChengyuZhu6 wondering if this call to cleanup images even needs to be inside the pid check conditional statement. Why not just run it every time?

Copy link
Author

Choose a reason for hiding this comment

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

If the snapshotter isn’t running, the remove_images function won’t have any effect.

Copy link

@AdithyaKrishnan AdithyaKrishnan left a comment

Choose a reason for hiding this comment

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

LGTM

@imeoer
Copy link
Collaborator

imeoer commented Jul 31, 2024

LGTM

remove related images/contents/snapshots in cleanup progress.

Signed-off-by: ChengyuZhu6 <[email protected]>
@imeoer imeoer merged commit 331a09a into containerd:main Jul 31, 2024
16 checks passed
@ChengyuZhu6 ChengyuZhu6 deleted the snapshotter-clean branch July 31, 2024 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants