mirror of https://github.com/k3s-io/k3s
Merge pull request #71663 from bart0sh/PR0044-kubeadm-1294-fix-unmount-kubelet-dirs
kubeadm: properly umount dirs in /var/lib/kubeletpull/564/head
commit
b6c8ef298e
|
@ -156,7 +156,7 @@ func (r *Reset) Run(out io.Writer, client clientset.Interface) error {
|
||||||
|
|
||||||
// Try to unmount mounted directories under kubeadmconstants.KubeletRunDirectory in order to be able to remove the kubeadmconstants.KubeletRunDirectory directory later
|
// Try to unmount mounted directories under kubeadmconstants.KubeletRunDirectory in order to be able to remove the kubeadmconstants.KubeletRunDirectory directory later
|
||||||
fmt.Printf("[reset] unmounting mounted directories in %q\n", kubeadmconstants.KubeletRunDirectory)
|
fmt.Printf("[reset] unmounting mounted directories in %q\n", kubeadmconstants.KubeletRunDirectory)
|
||||||
umountDirsCmd := fmt.Sprintf("awk '$2 ~ path {print $2}' path=%s /proc/mounts | xargs -r umount", kubeadmconstants.KubeletRunDirectory)
|
umountDirsCmd := fmt.Sprintf("awk '$2 ~ path {print $2}' path=%s/ /proc/mounts | xargs -r umount", kubeadmconstants.KubeletRunDirectory)
|
||||||
|
|
||||||
klog.V(1).Infof("[reset] executing command %q", umountDirsCmd)
|
klog.V(1).Infof("[reset] executing command %q", umountDirsCmd)
|
||||||
umountOutputBytes, err := exec.Command("sh", "-c", umountDirsCmd).Output()
|
umountOutputBytes, err := exec.Command("sh", "-c", umountDirsCmd).Output()
|
||||||
|
|
Loading…
Reference in New Issue