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

Commit

Permalink
Merge pull request #5788 from ryansavino/nydus-cleanup
Browse files Browse the repository at this point in the history
nydus: add var directory cleanup
  • Loading branch information
fidencio authored Oct 24, 2023
2 parents 69dafd0 + c628afe commit 78680d6
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 @@ -37,10 +37,17 @@ main () {
[ "${container_engine}" == "docker" ] && restart_docker_service
registry_server_teardown

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

info "Stop ${CRI_RUNTIME} service"
sudo systemctl stop "${CRI_RUNTIME}"

# 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 78680d6

Please sign in to comment.