Skip to content

Commit

Permalink
fix: ignore GetDisk timeout during disk attach
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
andyzhangx committed Feb 20, 2025
1 parent 6ade065 commit b0bc5d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/azuredisk/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,12 @@ func (d *Driver) ControllerPublishVolume(ctx context.Context, req *csi.Controlle

disk, err := d.checkDiskExists(ctx, diskURI)
if err != nil {
return nil, status.Error(codes.NotFound, fmt.Sprintf("Volume not found, failed with error: %v", err))
if strings.Contains(err.Error(), "context deadline") {
disk = nil
klog.Warningf("checkDiskExists(%s) failed with %v, proceed to attach disk", diskURI, err)
} else {
return nil, status.Error(codes.NotFound, fmt.Sprintf("Volume not found, failed with error: %v", err))
}
}

nodeID := req.GetNodeId()
Expand Down

0 comments on commit b0bc5d5

Please sign in to comment.