Skip to content

Commit

Permalink
Fix unmount errors when no directory
Browse files Browse the repository at this point in the history
  • Loading branch information
beornf committed Jun 27, 2024
1 parent 5dc8822 commit 399a457
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (n *VultrNodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUn
"staging-target-path": req.StagingTargetPath,
}).Info("Node Unstage Volume: called")

err := n.Driver.mounter.Unmount(req.StagingTargetPath)
err := mount.CleanupMountPoint(req.StagingTargetPath, n.Driver.mounter, true)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -210,7 +210,7 @@ func (n *VultrNodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.Node
"target-path": req.TargetPath,
}).Info("Node Unpublish Volume: called")

err := n.Driver.mounter.Unmount(req.TargetPath)
err := mount.CleanupMountPoint(req.TargetPath, n.Driver.mounter, true)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 399a457

Please sign in to comment.