Update cleanup.sh developer script
Modifies the script that cleans up the local environment between runs to allow the removal of /var/lib/kubelet/pods. The previous script hung up on volume-subpaths (in addition to io~secret and empty-dir, which were explicitly handled). This just unmounts everything before the files are removed in remove_files. Change-Id: I52cbe7d0f493336c1362ca3d3988038a1a15bcef
This commit is contained in:
parent
c9862e5749
commit
030739114f
@ -86,12 +86,7 @@ stop_kubelet() {
|
|||||||
|
|
||||||
# Issue with orhan PODS
|
# Issue with orhan PODS
|
||||||
# https://github.com/kubernetes/kubernetes/issues/38498
|
# https://github.com/kubernetes/kubernetes/issues/38498
|
||||||
find /var/lib/kubelet/pods 2> /dev/null | while read orphan_pod; do
|
find /var/lib/kubelet/pods -exec umount {} \; 2> /dev/null
|
||||||
if [[ ${orphan_pod} == *io~secret/* ]] || [[ ${orphan_pod} == *empty-dir/* ]]; then
|
|
||||||
umount "${orphan_pod}" || true
|
|
||||||
rm -rf "${orphan_pod}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user