Panic in OpenStackMachineReconciler if OpenStackCluster.Status.Network is nil (Hosted Control Plane scenario) #2380
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
/kind bug
What steps did you take and what happened:
In a “hosted control plane” setup (where the control plane runs outside of OpenStack, and only worker nodes are provisioned in OpenStack), OpenStackCluster.Status.Network can remain nil. Currently, the CAPO code in OpenStackMachineReconciler.getOrCreateMachineServer() assumes openStackCluster.Status.Network is always non-nil. This leads to a nil pointer dereference (panic) when calling:
The controller then crashes, making it impossible to provision worker nodes.
Logs:
What did you expect to happen:
That CAPO would handle the absence of status.network gracefully—e.g. by marking the OpenStackMachine with a condition or requeueing—rather than panicking.
Environment:
git rev-parse HEAD
if manually built):kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: