This repository was archived by the owner on Feb 8, 2021. It is now read-only.
File tree 1 file changed +1
-14
lines changed
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 {
418
418
// resource was the last reference to that disk on the kubelet.
419
419
func (c * cinderVolumeUnmounter ) TearDownAt (dir string ) error {
420
420
glog .V (5 ).Infof ("Cinder TearDown of %s" , dir )
421
+
421
422
notmnt , err := c .mounter .IsLikelyNotMountPoint (dir )
422
423
if err != nil {
423
424
glog .V (4 ).Infof ("IsLikelyNotMountPoint check failed: %v" , err )
@@ -481,20 +482,6 @@ func (c *cinderVolumeUnmounter) TearDownAt(dir string) error {
481
482
}
482
483
glog .V (3 ).Infof ("Successfully unmounted: %s\n " , dir )
483
484
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
-
498
485
notmnt , mntErr := c .mounter .IsLikelyNotMountPoint (dir )
499
486
if mntErr != nil {
500
487
glog .Errorf ("IsLikelyNotMountPoint check failed: %v" , mntErr )
You can’t perform that action at this time.
0 commit comments