Skip to content

Commit

Permalink
Add a change for killall to not unmount server and agent directory
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Savian <[email protected]>
  • Loading branch information
vitorsavian committed Jun 28, 2024
1 parent aa4794b commit 28926ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -829,8 +829,17 @@ do_unmount_and_remove() {
set -x
}
# Clean server directory and preserve db directory
find /var/lib/rancher/k3s/server ! -name "db" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
rm -rfv /var/lib/rancher/k3s/server/db/*
# Clean agent directory and preserve containerd directory
find /var/lib/rancher/k3s/agent ! -name "containerd" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
rm -rfv /var/lib/rancher/k3s/agent/containerd/*
do_unmount_and_remove '/run/k3s'
do_unmount_and_remove '/var/lib/rancher/k3s'
do_unmount_and_remove '/var/lib/rancher/k3s/data'
do_unmount_and_remove '/var/lib/rancher/k3s/storage'
do_unmount_and_remove '/var/lib/kubelet/pods'
do_unmount_and_remove '/var/lib/kubelet/plugins'
do_unmount_and_remove '/run/netns/cni-'
Expand Down
2 changes: 1 addition & 1 deletion install.sh.sha256sum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
696c6a93262b3e1f06a78841b8a82c238a8f17755824c024baad652b18bc92bc install.sh
74b3ea7609600665c2ee8ea36a8a9ba12675fe96fdfbe606df96d3e9e235b847 install.sh

0 comments on commit 28926ea

Please sign in to comment.