Skip to content

Commit

Permalink
Merge pull request #729 from andyzhangx/fix-archive-dir-error
Browse files Browse the repository at this point in the history
fix: archive dir error
  • Loading branch information
andyzhangx authored Aug 8, 2024
2 parents 6d84f18 + 433df76 commit 2524d92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/nfs/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"regexp"
"strconv"
"strings"
"time"

"github.com/container-storage-interface/spec/lib/go/csi"
"golang.org/x/net/context"
Expand Down Expand Up @@ -235,6 +236,8 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
return nil, status.Errorf(codes.Internal, "failed to mount nfs server: %v", err.Error())
}
defer func() {
// make sure archiving is completed before unmounting
time.Sleep(time.Second * 2)
if err = cs.internalUnmount(ctx, nfsVol); err != nil {
klog.Warningf("failed to unmount nfs server: %v", err.Error())
}
Expand Down

0 comments on commit 2524d92

Please sign in to comment.