diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter.go index 2959b53f9489..2f1e189b1c78 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter.go @@ -51,23 +51,15 @@ func (f *flexVolumeUnmounter) TearDownAt(dir string) error { return nil } - notmnt, err := isNotMounted(f.mounter, dir) + call := f.plugin.NewDriverCall(unmountCmd) + call.Append(dir) + _, err := call.Run() + if isCmdNotSupportedErr(err) { + err = (*unmounterDefaults)(f).TearDownAt(dir) + } if err != nil { return err } - if notmnt { - glog.Warningf("Warning: Path: %v already unmounted", dir) - } else { - call := f.plugin.NewDriverCall(unmountCmd) - call.Append(dir) - _, err := call.Run() - if isCmdNotSupportedErr(err) { - err = (*unmounterDefaults)(f).TearDownAt(dir) - } - if err != nil { - return err - } - } // Flexvolume driver may remove the directory. Ignore if it does. if pathExists, pathErr := util.PathExists(dir); pathErr != nil {