Skip to content

Commit

Permalink
Skip cleaning up clusters in a failed state on Capella.
Browse files Browse the repository at this point in the history
  • Loading branch information
brett19 committed Sep 10, 2024
1 parent 51ce9c9 commit d5b21e8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions deployment/clouddeploy/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,15 @@ func (p *Deployer) Cleanup(ctx context.Context) error {
p.logger.Info("removing cluster",
zap.String("cluster-id", cluster.Meta.ID.String()))

if cluster.Cluster != nil && cluster.Cluster.Status.State == "destroy_failed" {
p.logger.Warn("skipping due to destroy_failed state (cluster)")
continue
}
if cluster.Columnar != nil && cluster.Columnar.State == "destroy_failed" {
p.logger.Warn("skipping due to destroy_failed state (columnar)")
continue
}

p.removeCluster(ctx, cluster)
}
}
Expand Down

0 comments on commit d5b21e8

Please sign in to comment.