Add missing conditions on network error paths in OpenStackCluster reconciler#3107
Conversation
…onciler Several error paths in reconcileNetworkComponents and related functions were missing proper condition updates, which meant the cluster status would not accurately reflect failures in network reconciliation. Changes: - ReconcileExternalNetwork failure now sets NetworkReadyCondition=False - ManagedSubnets > 1 validation error now sets NetworkReadyCondition=False and calls handleUpdateOSCError (previously returned error silently) - resolveLoadBalancerNetwork failure now sets NetworkReadyCondition=False - loadbalancer.NewService failure in reconcileControlPlaneEndpoint now calls handleUpdateOSCError to set ReadyCondition=False - resolveLoadBalancerNetwork: always call handleUpdateOSCError on GetNetworkByParam failure, not only for ErrFilterMatch errors Tests added for external network failure and ManagedSubnets validation. Signed-off-by: Dong Ma <winterma.dong@gmail.com>
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @larainema. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What problem does this PR solve?
Several error paths in
reconcileNetworkComponentsand related functions were missing proper condition updates. This meant the cluster status would not accurately reflect failures during network reconciliation — the cluster could remain in aReadystate even when network operations had failed.Ref #2993
Changes
Controller fixes (
openstackcluster_controller.go)ReconcileExternalNetworkfailure — now setsNetworkReadyCondition=FalsewithNetworkReconcileFailedReasonManagedSubnets > 1validation error — now setsNetworkReadyCondition=Falseand callshandleUpdateOSCError(previously returned the error silently without updating any condition)resolveLoadBalancerNetworkfailure — now setsNetworkReadyCondition=Falseloadbalancer.NewServicefailure inreconcileControlPlaneEndpoint— now callshandleUpdateOSCErrorto setReadyCondition=FalseresolveLoadBalancerNetwork→GetNetworkByParamfailure — now always callshandleUpdateOSCErroron failure, not only forErrFilterMatcherrorsTests (
openstackcluster_controller_test.go)NetworkReadyConditionis set toFalsewhen more than one managed subnet is specifiedNetworkReadyConditionis set toFalsewhen external network reconciliation fails