Skip to content

Commit

Permalink
OCM-12269 | ci: fix with reducing the number of sg in id:73068
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwang-RH committed Nov 6, 2024
1 parent 9ce8c74 commit b1f5a80
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/hcp_machine_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ var _ = Describe("HCP MachinePool", ci.Day2, ci.FeatureMachinepool, func() {
Replicas: helper.IntPointer(replicas),
MachineType: helper.StringPointer(machineType),
Name: helper.StringPointer(name),
AdditionalSecurityGroups: helper.StringSlicePointer(output.SGIDs),
AdditionalSecurityGroups: helper.StringSlicePointer(sgIDs),
AutoscalingEnabled: helper.BoolPointer(false),
AutoRepair: helper.BoolPointer(false),
SubnetID: helper.StringPointer(vpcOutput.PrivateSubnets[0]),
Expand Down
13 changes: 11 additions & 2 deletions tests/utils/profilehandler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1054,9 +1054,18 @@ func (ctx *profileContext) DestroyRHCSClusterResources(token string) error {
if err != nil {
errs = append(errs, err)
} else {
_, err = vpcService.Destroy()
_, err := vpcService.Destroy()
if err != nil {
errs = append(errs, err)
if strings.Contains(err.Error(), "DependencyViolation") {
Logger.Warnf("DependencyViolation, waiting for 15 minutes before retrying. The error is %v", err)
time.Sleep(15 * time.Minute)
_, err = vpcService.Destroy()
if err != nil {
errs = append(errs, err)
}
} else {
errs = append(errs, err)
}
}
}
}
Expand Down

0 comments on commit b1f5a80

Please sign in to comment.