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 51674b8
Show file tree
Hide file tree
Showing 2 changed files with 14 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
15 changes: 13 additions & 2 deletions tests/utils/profilehandler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1054,9 +1054,20 @@ 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)
// Waiting 15 minutes for the vpc to be deleted and retry one time is as a workaround.
// Will remove this after the vpc dependency can be deleted before the vpc itself by monitoring the jobs result
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 51674b8

Please sign in to comment.