Skip to content

Commit a4031a9

Browse files
committed
skip invalid mountpoints on unpublish request
1 parent 32cd0a7 commit a4031a9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/plugin/node_server.go

+5
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ func (n NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpubl
191191
}
192192

193193
mnt, err := n.k8smounter.IsMountPoint(req.TargetPath)
194+
if !mnt || !os.IsNotExist(err) {
195+
klog.Warningf("mount cleanup skipped: %s is not a mount point", req.TargetPath)
196+
return &csi.NodeUnpublishVolumeResponse{}, nil
197+
}
198+
194199
if err != nil || !mnt {
195200
return &csi.NodeUnpublishVolumeResponse{}, err
196201
}

0 commit comments

Comments
 (0)