Skip to content

Commit

Permalink
nydus: cleanup
Browse files Browse the repository at this point in the history
Cleanup created nydus snapshots and var directory

Fixes: kata-containers#5787

Signed-Off-By: Ryan Savino <[email protected]>
  • Loading branch information
ryansavino committed Oct 23, 2023
1 parent 69dafd0 commit 0fb4a06
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions integration/kubernetes/cleanup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ main () {
info "Stop ${CRI_RUNTIME} service"
sudo systemctl stop "${CRI_RUNTIME}"

# Remove created nydus snapshots
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

# Cleanup nydus process, directories and binaries
sudo kill -9 $(pidof "containerd-nydus-grpc") || true
sudo rm -rf "/var/lib/containerd-nydus" || true
sudo rm -f "/usr/local/bin/nydus-overlayfs"
sudo rm -f "/usr/local/bin/nydus-image"

Expand Down

0 comments on commit 0fb4a06

Please sign in to comment.