mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
kubeadm: reset don't unmount /var/lib/kubelet if it is mounted
Previous PR that fixes this https://github.com/kubernetes/kubernetes/pull/71663 Signed-off-by: Thomas Tanaka <thomas.tanaka@gmail.com>
This commit is contained in:
parent
56c76023f7
commit
2e2d0845cd
@ -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