From e7c82c02504aa7297a95255690db29235a29b209 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Fri, 26 Apr 2019 13:29:48 +0000 Subject: [PATCH] fix flexvol stuck issue due to corrupted mnt point fix comments about PathExists fix comments revert change in PathExists func --- pkg/volume/flexvolume/unmounter.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/volume/flexvolume/unmounter.go b/pkg/volume/flexvolume/unmounter.go index 3da5f77e81..9435f2c2c4 100644 --- a/pkg/volume/flexvolume/unmounter.go +++ b/pkg/volume/flexvolume/unmounter.go @@ -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)