From 030739114f1fde47e0e142588f4c913684fc835b Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Fri, 15 Jan 2021 20:10:13 +0000 Subject: [PATCH] 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 --- tools/cleanup.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/cleanup.sh b/tools/cleanup.sh index d20d790e..d0b0ea52 100755 --- a/tools/cleanup.sh +++ b/tools/cleanup.sh @@ -86,12 +86,7 @@ stop_kubelet() { # Issue with orhan PODS # https://github.com/kubernetes/kubernetes/issues/38498 - find /var/lib/kubelet/pods 2> /dev/null | while read orphan_pod; do - if [[ ${orphan_pod} == *io~secret/* ]] || [[ ${orphan_pod} == *empty-dir/* ]]; then - umount "${orphan_pod}" || true - rm -rf "${orphan_pod}" - fi - done + find /var/lib/kubelet/pods -exec umount {} \; 2> /dev/null }