Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #75234: fix flexvol stuck issue due to corrupted mnt point #79132

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions pkg/volume/flexvolume/unmounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ func (f *flexVolumeUnmounter) TearDown() error {
}

func (f *flexVolumeUnmounter) TearDownAt(dir string) error {

pathExists, pathErr := util.PathExists(dir)
if !pathExists {
klog.Warningf("Warning: Unmount skipped because path does not exist: %v", dir)
return nil
}

if pathErr != nil && !util.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