Skip to content

Conversation

ChengyuZhu6
Copy link
Member

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
Member 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
Member 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
Member 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 <chengyu.zhu@intel.com>
@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