Skip to content

Commit

Permalink
fix: unmount failure due to incorrect mount path check
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed Jul 16, 2021
1 parent 29a07ac commit 39ab8a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/smb/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (d *Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublish
}

klog.V(2).Infof("NodeUnpublishVolume: unmounting volume %s on %s", volumeID, targetPath)
err := CleanupSMBMountPoint(d.mounter, targetPath, false)
err := CleanupSMBMountPoint(d.mounter, targetPath, true /*extensiveMountPointCheck*/)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to unmount target %q: %v", targetPath, err)
}
Expand Down Expand Up @@ -225,7 +225,7 @@ func (d *Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolu
defer d.volumeLocks.Release(volumeID)

klog.V(2).Infof("NodeUnstageVolume: CleanupMountPoint on %s with volume %s", stagingTargetPath, volumeID)
if err := CleanupSMBMountPoint(d.mounter, stagingTargetPath, false); err != nil {
if err := CleanupSMBMountPoint(d.mounter, stagingTargetPath, true /*extensiveMountPointCheck*/); err != nil {
return nil, status.Errorf(codes.Internal, "failed to unmount staging target %q: %v", stagingTargetPath, err)
}

Expand Down

0 comments on commit 39ab8a8

Please sign in to comment.