Merge pull request #840 from andyzhangx/fix-dup-mount

fix: duplicated nfs mount
This commit is contained in:
Andy Zhang 2025-01-12 20:18:02 +08:00 committed by GitHub
commit 1616c4e170
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -136,10 +136,6 @@ func (ns *NodeServer) NodePublishVolume(_ context.Context, req *csi.NodePublishV
}
timeoutFunc := func() error { return fmt.Errorf("time out") }
if err := WaitUntilTimeout(90*time.Second, execFunc, timeoutFunc); err != nil {
return nil, status.Error(codes.Internal, fmt.Sprintf("volume(%s) mount %q on %q failed with %v", volumeID, source, targetPath, err))
}
err = ns.mounter.Mount(source, targetPath, "nfs", mountOptions)
if err != nil {
if os.IsPermission(err) {
return nil, status.Error(codes.PermissionDenied, err.Error())
}