aboutsummaryrefslogtreecommitdiff
path: root/pkg/driver/nodeserver.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2023-08-06 18:21:55 -0700
committerGitHub <noreply@github.com>2023-08-06 18:21:55 -0700
commit615c145190e7cb880bf2542d3ae9e750b28b9a89 (patch)
treee3c646e031c35b0299d58407994b10b5ed38a89a /pkg/driver/nodeserver.go
parentd777b8750bb2dd33948988f4eec8813e6207a0cd (diff)
parenteca9cde95a899ab5645b00d8c0d547abd4bc7e8e (diff)
downloadseaweedfs-csi-driver-615c145190e7cb880bf2542d3ae9e750b28b9a89.tar.xz
seaweedfs-csi-driver-615c145190e7cb880bf2542d3ae9e750b28b9a89.zip
Merge pull request #131 from kvaster/refactor-1
Update dependencies
Diffstat (limited to 'pkg/driver/nodeserver.go')
-rw-r--r--pkg/driver/nodeserver.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/pkg/driver/nodeserver.go b/pkg/driver/nodeserver.go
index 87fe6c5..56d02c6 100644
--- a/pkg/driver/nodeserver.go
+++ b/pkg/driver/nodeserver.go
@@ -10,7 +10,7 @@ import (
"github.com/seaweedfs/seaweedfs/weed/glog"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
- "k8s.io/utils/mount"
+ "k8s.io/mount-utils"
)
type NodeServer struct {
@@ -149,8 +149,7 @@ func (ns *NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpu
glog.Warningf("volume %s hasn't been published", volumeID)
// make sure there is no any garbage
- mounter := mount.New("")
- _ = mount.CleanupMountPoint(targetPath, mounter, true)
+ _ = mount.CleanupMountPoint(targetPath, mountutil, true)
return &csi.NodeUnpublishVolumeResponse{}, nil
}
@@ -221,8 +220,7 @@ func (ns *NodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstag
glog.Warningf("volume %s hasn't been staged", volumeID)
// make sure there is no any garbage
- mounter := mount.New("")
- _ = mount.CleanupMountPoint(stagingTargetPath, mounter, true)
+ _ = mount.CleanupMountPoint(stagingTargetPath, mountutil, true)
} else {
if err := volume.(*Volume).Unstage(stagingTargetPath); err != nil {
return nil, status.Error(codes.Internal, err.Error())