Skip to content

Commit 54f4b77

Browse files
Merge pull request #10124 from tthvo/OCPBUGS-65938
OCPBUGS-65938: increase IAM waiter timeout and remove custom delay options
2 parents 90b08c7 + a92c401 commit 54f4b77

File tree

1 file changed

+2
-10
lines changed
  • pkg/infrastructure/aws/clusterapi

1 file changed

+2
-10
lines changed

pkg/infrastructure/aws/clusterapi/iam.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,7 @@ func createIAMRoles(ctx context.Context, infraID string, ic *installconfig.Insta
188188
}
189189

190190
waiter := iam.NewInstanceProfileExistsWaiter(client)
191-
if err := waiter.Wait(ctx, &iam.GetInstanceProfileInput{InstanceProfileName: profileName}, 2*time.Minute,
192-
func(o *iam.InstanceProfileExistsWaiterOptions) {
193-
o.MaxDelay = 5 * time.Second
194-
o.MinDelay = 1 * time.Second
195-
}); err != nil {
191+
if err := waiter.Wait(ctx, &iam.GetInstanceProfileInput{InstanceProfileName: profileName}, 15*time.Minute); err != nil {
196192
return fmt.Errorf("failed to wait for %s instance profile to exist: %w", role, err)
197193
}
198194

@@ -253,11 +249,7 @@ func getOrCreateIAMRole(ctx context.Context, nodeRole, infraID, assumePolicy str
253249
return "", fmt.Errorf("failed to create %s role: %w", nodeRole, err)
254250
}
255251
waiter := iam.NewRoleExistsWaiter(svc)
256-
if err := waiter.Wait(ctx, &iam.GetRoleInput{RoleName: roleName}, 2*time.Minute,
257-
func(o *iam.RoleExistsWaiterOptions) {
258-
o.MaxDelay = 5 * time.Second
259-
o.MinDelay = 1 * time.Second
260-
}); err != nil {
252+
if err := waiter.Wait(ctx, &iam.GetRoleInput{RoleName: roleName}, 15*time.Minute); err != nil {
261253
return "", fmt.Errorf("failed to wait for %s role to exist: %w", nodeRole, err)
262254
}
263255
}

0 commit comments

Comments
 (0)