fix flexvol stuck issue due to corrupted mnt point

fix comments about PathExists

fix comments

revert change in PathExists func
k3s-v1.14.4
andyzhangx 2019-04-26 13:29:48 +00:00
parent d1c99590f4
commit e7c82c0250
1 changed files with 8 additions and 8 deletions

View File

@ -42,15 +42,15 @@ func (f *flexVolumeUnmounter) TearDown() error {
}
func (f *flexVolumeUnmounter) TearDownAt(dir string) error {
pathExists, pathErr := mount.PathExists(dir)
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
}
if pathErr != nil && !mount.IsCorruptedMnt(pathErr) {
return fmt.Errorf("Error checking path: %v", pathErr)
}
call := f.plugin.NewDriverCall(unmountCmd)