Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

nydus: add var directory cleanup #5788

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

ryansavino
Copy link
Member

Fixes: #5787

@katacontainersbot katacontainersbot added the size/tiny Smallest and simplest task label Oct 20, 2023
@ryansavino
Copy link
Member Author

/test

@@ -41,6 +41,7 @@ main () {
sudo systemctl stop "${CRI_RUNTIME}"

sudo kill -9 $(pidof "containerd-nydus-grpc") || true
sudo rm -rf "/var/lib/containerd-nydus" || true
Copy link
Member

Choose a reason for hiding this comment

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

@ryansavino, as part of the cleanup, I'd also add:

for i in `sudo ctr -n k8s.io snapshot --snapshotter nydus list | grep -v KEY | cut -d' ' -f1`; do sudo ctr -n k8s.io snapshot --snapshotter nydus rm $i; done

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! I have added this.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, last "request" / "suggestion", can you make sure we don't fail on that command?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure thing. Also, I moved the nydus snapshot cleanup to right before the CRI_RUNTIME stop call. In case this might cause any issues.

@ryansavino
Copy link
Member Author

/test

Cleanup created nydus snapshots and var directory

Fixes: kata-containers#5787

Signed-Off-By: Ryan Savino <[email protected]>
@ryansavino
Copy link
Member Author

/test

Copy link
Member

@fidencio fidencio left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @ryansavino!

@fidencio fidencio merged commit 78680d6 into kata-containers:CCv0 Oct 24, 2023
12 of 13 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/tiny Smallest and simplest task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants