OCPBUGS-101964: [release-4.22] OCPBUGS-98213: fix router component ordering to prevent missing HAProxy backends - #9212
Conversation
…-creating components Add a predicate to the router component that ensures all expected HCP router routes exist and are ready before reconciling on ARO-HCP clusters. This includes kube-apiserver-internal, konnectivity-server, oauth-internal, ignition-server, and conditionally metrics-proxy when metrics forwarding is enabled. The router also declares explicit WithDependencies on ignition-server and metrics-proxy components to give the informer cache more time to sync after those components create their routes via server-side apply. Add a TODO for introducing live reloading (like shared proxy) so the router config is updated when routes change after the initial reconcile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dencies The metrics-proxy component is conditional (only created when MetricsForwarding.Mode=Forward), so declaring it as a hard dependency causes a deadlock on platforms where it is never instantiated (e.g. GKE). The router predicate already ensures metrics-proxy routes exist before reconciling, making the explicit dependency unnecessary. Update all 5 router fixture YAML files to match the actual declared dependency (ignition-server only). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…AS dependency The ignition-server only needs the management cluster KAS (via its service account token), not the hosted cluster KAS. Including it in the implicit KAS dependency creates a deadlock on private clusters with KMS encryption (e.g. Azure ARO-HCP with private Key Vault): Router → ignition-server → KAS → Router (for KMS connectivity) By excluding ignition-server from the KAS dependency, its deployment and route are created independently, unblocking the router, which in turn provides the network path KAS needs to reach the KMS endpoint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The oauth-internal route is only created by the infra reconciler when OAuth is enabled (HCPOAuthEnabled). When OAuth is disabled (e.g. OIDC authentication), the route is never created, causing the ARO router predicate to wait forever — a deadlock. Move oauth-internal from the unconditional base list to a conditional append gated on HCPOAuthEnabled, matching how the infra reconciler decides whether to create the route. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…icit KAS dependency The ignition-server-proxy component does not need the hosted KAS — it only proxies to the ignition-server, which is already excluded. Including it in the implicit KAS dependency creates the same deadlock as ignition-server on private clusters with KMS encryption: the router waits for the ignition-server-proxy Service to exist, but ignition- server-proxy waits for KAS, which waits for the router. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace support/netutil imports with support/util (netutil package does not exist on release-4.22) - Use FakeReleaseProvider instead of gomock-generated mock (mock file not generated on release-4.22) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@bennerv: This pull request references Jira Issue OCPBUGS-98213, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
/jira cherrypick OCPBUGS-98213 |
|
@bennerv: Jira Issue OCPBUGS-98213 has been cloned as Jira Issue OCPBUGS-101964. Will retitle bug to link to clone. DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
@bennerv: This pull request references Jira Issue OCPBUGS-101964, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-4.22 #9212 +/- ##
================================================
+ Coverage 36.34% 36.36% +0.02%
================================================
Files 775 775
Lines 95049 95110 +61
================================================
+ Hits 34545 34591 +46
- Misses 57679 57692 +13
- Partials 2825 2827 +2
🚀 New features to boost your workflow:
|
| func TestRouterComponentComesAfterRouteCreatingComponents(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| reconciler := &HostedControlPlaneReconciler{ |
There was a problem hiding this comment.
releaseinfo.NewMockedProvider.... isn't on release-4.22, hence why we just use a fake release provider here.
Built from openshift/hypershift cherry-pick-OCPBUGS-98213-to-release-4.22 at commit 829f43241b (openshift/hypershift#9212). Image: arohcpocpdev.azurecr.io/control-plane-operator@sha256:2a9a553057e74e9263829ad636213cad63f9d8ae91a104e0a3d593a0164ce294 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bennerv, bryan-cox The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/jira refresh |
|
@bryan-cox: This pull request references Jira Issue OCPBUGS-101964, which is invalid:
Comment DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@bryan-cox: This pull request references Jira Issue OCPBUGS-101964, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
Built from openshift/hypershift cherry-pick-OCPBUGS-98213-to-release-4.22 at commit 829f43241b (openshift/hypershift#9212). Image: arohcpocpdev.azurecr.io/control-plane-operator@sha256:2a9a553057e74e9263829ad636213cad63f9d8ae91a104e0a3d593a0164ce294 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
/verified by @twolff-gh CPO override test cluster showed 1 configmap create + 1 deployment create, no subsequent CPO updates, single replicaset |
|
@twolff-gh: This PR has been marked as verified by DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/lgtm |
|
Scheduling tests matching the |
|
/test e2e-v2-aws |
|
@bennerv: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
0cb524b
into
openshift:release-4.22
|
@bennerv: Jira Issue Verification Checks: Jira Issue OCPBUGS-101964 Jira Issue OCPBUGS-101964 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/cherry-pick release-4.21 |
|
@bennerv: #9212 failed to apply on top of branch "release-4.21": DetailsIn response to this:
Instructions 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. |
|
Cherry-pick to release-4.21 created in #9263 (manual conflict resolution required). |
Summary
Cherry-pick of PR #8971 to release-4.22 with manual conflict resolution and adaptation fixes.
Commits
77e577f6c4: fix(control-plane-operator): ensure router component runs after route-creating componentsc995ad02f6: fix(control-plane-operator): drop metrics-proxy from router WithDependencies2b9df60b2f: fix(control-plane-component): exclude ignition-server from implicit KAS dependency00e36f3406: fix(router): conditionally include oauth-internal in ARO route predicated565a6ed5b: fix(control-plane-component): exclude ignition-server-proxy from implicit KAS dependencyFixes Applied
hostedcontrolplane_controller_test.go(test functions present on main but not on release-4.22)support/netutilimports withsupport/util(netutil package does not exist on release-4.22)FakeReleaseProvider(mock file not generated on release-4.22)References
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com