mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 02:06:23 +00:00
Merge pull request #137569 from fuweid/cp-1374942-135
[release-1.35] cmd/kubeadm: ignore EINVAL error during unmount
This commit is contained in:
@@ -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]))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user