mirror of https://github.com/k3s-io/k3s
Merge pull request #79131 from andyzhangx/automated-cherry-pick-of-#75234-upstream-release-1.14
Automated cherry pick of #75234: fix flexvol stuck issue due to corrupted mnt pointk3s-v1.14.4
commit
6b360e905b
|
@ -42,15 +42,15 @@ func (f *flexVolumeUnmounter) TearDown() error {
|
|||
}
|
||||
|
||||
func (f *flexVolumeUnmounter) TearDownAt(dir string) error {
|
||||
|
||||
pathExists, pathErr := mount.PathExists(dir)
|
||||
if !pathExists {
|
||||
klog.Warningf("Warning: Unmount skipped because path does not exist: %v", dir)
|
||||
return nil
|
||||
}
|
||||
|
||||
if pathErr != nil && !mount.IsCorruptedMnt(pathErr) {
|
||||
return fmt.Errorf("Error checking path: %v", pathErr)
|
||||
if pathErr != nil {
|
||||
// only log warning here since plugins should anyways have to deal with errors
|
||||
klog.Warningf("Error checking path: %v", pathErr)
|
||||
} else {
|
||||
if !pathExists {
|
||||
klog.Warningf("Warning: Unmount skipped because path does not exist: %v", dir)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
call := f.plugin.NewDriverCall(unmountCmd)
|
||||
|
|
Loading…
Reference in New Issue