Merge pull request #137569 from fuweid/cp-1374942-135

[release-1.35] cmd/kubeadm: ignore EINVAL error during unmount
This commit is contained in:
Kubernetes Prow Robot
2026-03-11 19:13:38 +05:30
committed by GitHub

View File

@@ -70,6 +70,12 @@ func unmountKubeletDirectory(kubeletRunDirectory string, flags []string) error {
}
klog.V(5).Infof("[reset] Unmounting %q", m[1])
if err := syscall.Unmount(m[1], flagsInt); err != nil {
// EINVAL is expected here if a duplicate mount entry
// was already unmounted via its shared peer.
if err == syscall.EINVAL {
klog.Warningf("[reset] Ignoring EINVAL error while unmounting %q", m[1])
continue
}
errList = append(errList, errors.WithMessagef(err, "failed to unmount %q", m[1]))
}
}