Skip to content

Commit de103c5

Browse files
committed
Fix race condition causing invalid CS API calls when zone id is not resolved yet
Signed-off-by: Hans Rakers <[email protected]>
1 parent 31460fb commit de103c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

controllers/cloudstackisolatednetwork_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ func (r *CloudStackIsoNetReconciliationRunner) Reconcile() (retRes ctrl.Result,
7575
if err != nil {
7676
return r.ReturnWrappedError(retErr, "setting up CloudStackCluster patcher")
7777
}
78+
if r.FailureDomain.Spec.Zone.ID == "" {
79+
return r.RequeueWithMessage("Zone ID not resolved yet.")
80+
}
7881
if err := r.CSUser.GetOrCreateIsolatedNetwork(r.FailureDomain, r.ReconciliationSubject, r.CSCluster); err != nil {
7982
return ctrl.Result{}, err
8083
}

0 commit comments

Comments
 (0)