Skip to content

Commit 2bd6c40

Browse files
Merge pull request #551 from mjlshen/OHSS-34009
Improve messaging around cluster uninstallation expectations
2 parents 6459888 + 798f5e6 commit 2bd6c40

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cmd/cluster/cleanup_leaked_ec2.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,14 @@ func (c *cleanup) RemediateOCPBUGS23174(ctx context.Context) error {
173173
return fmt.Errorf("failed to automatically cleanup EC2 instances: %v", err)
174174
}
175175

176-
log.Printf("success - the cluster should be uninstalled soon")
176+
switch c.cluster.State() {
177+
case cmv1.ClusterStateError:
178+
fallthrough
179+
case cmv1.ClusterStateUninstalling:
180+
log.Printf("success - cluster was in state: %s and should be uninstalled soon", c.cluster.State())
181+
default:
182+
log.Printf("success - cluster is in state: %s", c.cluster.State())
183+
}
177184
return nil
178185
}
179186
}

0 commit comments

Comments
 (0)