Skip to content

Commit

Permalink
Merge pull request #75234 from andyzhangx/corrupt-mnt-fix
Browse files Browse the repository at this point in the history
fix pod stuck issue due to corrupt mnt point in flexvol plugin
  • Loading branch information
k8s-ci-robot committed Jun 14, 2019
2 parents 69d2e43 + fb81a28 commit 3a598d7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/volume/flexvolume/unmounter.go
Expand Up @@ -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)
Expand Down

0 comments on commit 3a598d7

Please sign in to comment.