From ed96c334bf0793c9559aa5be55031f525911382c Mon Sep 17 00:00:00 2001 From: Beorn Facchini Date: Thu, 31 Oct 2024 02:20:44 +0800 Subject: [PATCH] Fix volume unpublish errors when missing directory (#226) Co-authored-by: Michael Riley --- driver/node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/node.go b/driver/node.go index 68c08f4..bbeafb7 100644 --- a/driver/node.go +++ b/driver/node.go @@ -139,7 +139,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 } @@ -211,7 +211,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 }