@@ -76,12 +76,12 @@ var AttachDiskBackoff = wait.Backoff{
76
76
Cap : 0 }
77
77
78
78
// WaitForOpBackoff is backoff used to wait for Global, Regional or Zonal operation to complete.
79
- // Default values are similar to Poll every 3 seconds with 5 minute timeout.
79
+ // Default values are similar to Poll every 2 minutes with 6 minute timeout.
80
80
var WaitForOpBackoff = wait.Backoff {
81
- Duration : 3 * time .Second ,
81
+ Duration : 2 * time .Minute ,
82
82
Factor : 0.0 ,
83
83
Jitter : 0.0 ,
84
- Steps : 100 ,
84
+ Steps : 3 ,
85
85
Cap : 0 }
86
86
87
87
// Custom error type to propagate error messages up to clients.
@@ -1066,7 +1066,7 @@ func (cloud *CloudProvider) getRegionalDiskTypeURI(project string, region, diskT
1066
1066
func (cloud * CloudProvider ) waitForZonalOp (ctx context.Context , project , opName string , zone string ) error {
1067
1067
// The v1 API can query for v1, alpha, or beta operations.
1068
1068
return wait .ExponentialBackoff (WaitForOpBackoff , func () (bool , error ) {
1069
- pollOp , err := cloud .service .ZoneOperations .Get (project , zone , opName ).Context (ctx ).Do ()
1069
+ pollOp , err := cloud .service .ZoneOperations .Wait (project , zone , opName ).Context (ctx ).Do ()
1070
1070
if err != nil {
1071
1071
klog .Errorf ("WaitForOp(op: %s, zone: %#v) failed to poll the operation" , opName , zone )
1072
1072
return false , err
@@ -1079,7 +1079,7 @@ func (cloud *CloudProvider) waitForZonalOp(ctx context.Context, project, opName
1079
1079
func (cloud * CloudProvider ) waitForRegionalOp (ctx context.Context , project , opName string , region string ) error {
1080
1080
// The v1 API can query for v1, alpha, or beta operations.
1081
1081
return wait .ExponentialBackoff (WaitForOpBackoff , func () (bool , error ) {
1082
- pollOp , err := cloud .service .RegionOperations .Get (project , region , opName ).Context (ctx ).Do ()
1082
+ pollOp , err := cloud .service .RegionOperations .Wait (project , region , opName ).Context (ctx ).Do ()
1083
1083
if err != nil {
1084
1084
klog .Errorf ("WaitForOp(op: %s, region: %#v) failed to poll the operation" , opName , region )
1085
1085
return false , err
@@ -1091,7 +1091,7 @@ func (cloud *CloudProvider) waitForRegionalOp(ctx context.Context, project, opNa
1091
1091
1092
1092
func (cloud * CloudProvider ) waitForGlobalOp (ctx context.Context , project , opName string ) error {
1093
1093
return wait .ExponentialBackoff (WaitForOpBackoff , func () (bool , error ) {
1094
- pollOp , err := cloud .service .GlobalOperations .Get (project , opName ).Context (ctx ).Do ()
1094
+ pollOp , err := cloud .service .GlobalOperations .Wait (project , opName ).Context (ctx ).Do ()
1095
1095
if err != nil {
1096
1096
klog .Errorf ("waitForGlobalOp(op: %s) failed to poll the operation" , opName )
1097
1097
return false , err
0 commit comments