Skip to content

Commit 2842e94

Browse files
committed
fix: ignore retry error codes
1 parent d168ee2 commit 2842e94

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pkg/rclone/nodeserver.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"runtime"
1818
"strings"
1919
"sync"
20+
"syscall"
2021
"time"
2122

2223
"github.com/SwissDataScienceCenter/csi-rclone/pkg/kube"
@@ -394,7 +395,7 @@ func (ns *NodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstag
394395
ns.removeTrackedVolume(req.GetVolumeId())
395396

396397
for {
397-
if err := ns.mounter.Unmount(volume.TargetPath); err != nil {
398+
if err := ns.mounter.Unmount(volume.TargetPath); err != nil && !(errors.Is(err, syscall.EAGAIN) || errors.Is(err, syscall.EBUSY)) {
398399
// keep unmounting whatever is on the folder until we can't
399400
break
400401
}
@@ -625,7 +626,7 @@ func (ns *NodeServer) NodeUnpublishVolume(_ context.Context, req *csi.NodeUnpubl
625626
}
626627

627628
for {
628-
if err := ns.mounter.Unmount(req.GetTargetPath()); err != nil {
629+
if err := ns.mounter.Unmount(req.GetTargetPath()); err != nil && !(errors.Is(err, syscall.EAGAIN) || errors.Is(err, syscall.EBUSY)) {
629630
// keep unmounting whatever is on the folder until we can't
630631
break
631632
}

0 commit comments

Comments
 (0)