mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #93702 from thtanaka/feature/fix-kubeadm-reset
kubeadm: reset don't unmount /var/lib/kubelet if it is mounted
This commit is contained in:
commit
27df218c72
@ -32,6 +32,12 @@ func unmountKubeletDirectory(absoluteKubeletRunDirectory string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !strings.HasSuffix(absoluteKubeletRunDirectory, "/") {
|
||||
// trailing "/" is needed to ensure that possibly mounted /var/lib/kubelet is skipped
|
||||
absoluteKubeletRunDirectory += "/"
|
||||
}
|
||||
|
||||
mounts := strings.Split(string(raw), "\n")
|
||||
for _, mount := range mounts {
|
||||
m := strings.Split(mount, " ")
|
||||
|
Loading…
Reference in New Issue
Block a user