This repository was archived by the owner on Feb 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -418,6 +418,7 @@ func (c *cinderVolumeUnmounter) TearDown() error {
418418// resource was the last reference to that disk on the kubelet.
419419func (c * cinderVolumeUnmounter ) TearDownAt (dir string ) error {
420420 glog .V (5 ).Infof ("Cinder TearDown of %s" , dir )
421+
421422 notmnt , err := c .mounter .IsLikelyNotMountPoint (dir )
422423 if err != nil {
423424 glog .V (4 ).Infof ("IsLikelyNotMountPoint check failed: %v" , err )
@@ -481,20 +482,6 @@ func (c *cinderVolumeUnmounter) TearDownAt(dir string) error {
481482 }
482483 glog .V (3 ).Infof ("Successfully unmounted: %s\n " , dir )
483484
484- // NOTE(harryz) use manager to detach disk,refactor this into cinder.attacher when manager is removed
485- // If refCount is 1, then all bind mounts have been removed, and the
486- // remaining reference is the global mount. It is safe to detach.
487- if ! c .withOpenStackCP && c .isNoMountSupported {
488- if len (refs ) == 1 {
489- if err := c .manager .DetachDisk (c ); err != nil {
490- glog .V (4 ).Infof ("DetachDisk failed: %v" , err )
491- return err
492- }
493- glog .V (3 ).Infof ("Volume %s detached" , c .pdName )
494- }
495- }
496- // NOTE END
497-
498485 notmnt , mntErr := c .mounter .IsLikelyNotMountPoint (dir )
499486 if mntErr != nil {
500487 glog .Errorf ("IsLikelyNotMountPoint check failed: %v" , mntErr )
You can’t perform that action at this time.
0 commit comments