Skip to content

Commit 5cb9aee

Browse files
authored
Merge pull request #475 from andyzhangx/extensiveMountPointCheck
fix: unmount failure due to incorrect mount path check
2 parents 9e9854f + 8d7e8dd commit 5cb9aee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/blob/nodeserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (d *Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublish
168168
volumeID := req.GetVolumeId()
169169

170170
klog.V(2).Infof("NodeUnpublishVolume: unmounting volume %s on %s", volumeID, targetPath)
171-
err := mount.CleanupMountPoint(targetPath, d.mounter, false)
171+
err := mount.CleanupMountPoint(targetPath, d.mounter, true /*extensiveMountPointCheck*/)
172172
if err != nil {
173173
return nil, status.Errorf(codes.Internal, "failed to unmount target %q: %v", targetPath, err)
174174
}
@@ -340,7 +340,7 @@ func (d *Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolu
340340
defer d.volumeLocks.Release(volumeID)
341341

342342
klog.V(2).Infof("NodeUnstageVolume: volume %s unmounting on %s", volumeID, stagingTargetPath)
343-
err := mount.CleanupMountPoint(stagingTargetPath, d.mounter, false)
343+
err := mount.CleanupMountPoint(stagingTargetPath, d.mounter, true /*extensiveMountPointCheck*/)
344344
if err != nil {
345345
return nil, status.Errorf(codes.Internal, "failed to unmount staging target %q: %v", stagingTargetPath, err)
346346
}

0 commit comments

Comments
 (0)