Unverified Commit 6b360e90 authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

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 point
parents 8daa63bd e7c82c02
...@@ -42,15 +42,15 @@ func (f *flexVolumeUnmounter) TearDown() error { ...@@ -42,15 +42,15 @@ func (f *flexVolumeUnmounter) TearDown() error {
} }
func (f *flexVolumeUnmounter) TearDownAt(dir string) error { func (f *flexVolumeUnmounter) TearDownAt(dir string) error {
pathExists, pathErr := mount.PathExists(dir) pathExists, pathErr := mount.PathExists(dir)
if !pathExists { if pathErr != nil {
klog.Warningf("Warning: Unmount skipped because path does not exist: %v", dir) // only log warning here since plugins should anyways have to deal with errors
return nil klog.Warningf("Error checking path: %v", pathErr)
} } else {
if !pathExists {
if pathErr != nil && !mount.IsCorruptedMnt(pathErr) { klog.Warningf("Warning: Unmount skipped because path does not exist: %v", dir)
return fmt.Errorf("Error checking path: %v", pathErr) return nil
}
} }
call := f.plugin.NewDriverCall(unmountCmd) call := f.plugin.NewDriverCall(unmountCmd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment