Skip to content

Commit 7e7eb1a

Browse files
committed
Improve CAO deployment reliability by waiting for more potential conditions.
1 parent 0504dff commit 7e7eb1a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

utils/caocontrol/controller.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,19 @@ func (c *Controller) waitCouchbaseClusterAvailable(
874874
}
875875

876876
// mark it unavailable if we are in the middle of scaling
877+
blockingScaleCondTypes := []string{
878+
"Scaling",
879+
"ScalingUp",
880+
"ScalingDown",
881+
"Upgrading",
882+
"Hibernating",
883+
"Error",
884+
"Migrating",
885+
"Rebalancing",
886+
"BucketMigrating",
887+
}
877888
for _, cond := range status.Conditions {
878-
if cond.Type == "Scaling" && cond.Status == "True" {
889+
if slices.Contains(blockingScaleCondTypes, string(cond.Type)) && cond.Status == "True" {
879890
clusterAvailable = false
880891
}
881892
}

0 commit comments

Comments
 (0)