OCPBUGS-100065: on-prem: tune API VIP haproxy health checks - #6400
OCPBUGS-100065: on-prem: tune API VIP haproxy health checks#6400mkowalski wants to merge 1 commit into
Conversation
On metal-ipi upgrades a freshly rebooted master's kube-apiserver passes /readyz (core API works over host network) before the node's OVN pod network has converged. With 'rise 1' haproxy re-adds it to the API VIP rotation on a single passing probe and immediately routes ~1/3 of new connections to it, where requests proxied to aggregated APIs (oauth-apiserver, openshift-apiserver) hang and fail, causing 10-15s of oauth/openshift API new-connection disruption in ~30-50% of runs. Tune the health check on the masters backend: - rise 3 (was 1): require 3 consecutive passing /readyz probes before re-adding a server, adding a 10s buffer after readyz and protecting against a single lucky probe while the pod network is still converging. - weight 256 + slowstart 60s (was weight 1, no slowstart): ramp a newly risen server's share of new connections from ~4% to 100% over 60s instead of instantly taking a full round-robin share, covering the readyz-to-OVN-convergence window plus the aggregator's dead connection detection tail. slowstart needs a large base weight to have ramp granularity; relative weights stay equal. - fall 2 + fastinter 2s (was fall 3, no fastinter): mark a dying master down in ~4s instead of ~15s, shrinking the disruption episodes correlated with a master going down before VIP failover. - on-marked-down shutdown-sessions: terminate established client connections to a server the moment it is marked down so clients reconnect to healthy masters instead of timing out. This is a downstream mitigation for the routing half of OCPBUGS-100065; the aggregator-side fixes (openshift/kubernetes#2730, openshift/kubernetes#2732) address the readyz semantics and http2 dead connection pinning respectively. Assisted-By: Claude Fable 5
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@mkowalski: This pull request references Jira Issue OCPBUGS-100065, 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughThe HAProxy server template now uses a higher server weight, faster health checks, updated failure and recovery thresholds, a 60-second slow start, and session shutdown when the server is marked down. ChangesHAProxy server tuning
Estimated code review effort: 1 (Trivial) | ~3 minutes Mergeability Score: ⚪ Minimal · up to This localized HAProxy health-check tuning change is merge-ready after normal checks and review; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mkowalski 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 |
|
/payload-aggregate periodic-ci-openshift-release-main-nightly-5.0-e2e-metal-ipi-upgrade-ovn-ipv6 10 |
|
/hold We are benchmarking this change now, similar to https://redhat.atlassian.net/browse/OCPBUGS-100065?focusedCommentId=17805935 |
|
@mkowalski: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/25a0f2f0-970d-11f1-995d-630277880b32-0 |
Payload validation results10x
Comparison against the data in OCPBUGS-100065 (this PR tested alone, without openshift/kubernetes#2730 / openshift/kubernetes#2732):
Takeaways:
This comment was generated using AI. Please verify before acting on it. |
|
/payload-aggregate-with-prs periodic-ci-openshift-release-main-nightly-5.0-e2e-metal-ipi-upgrade-ovn-ipv6 10 openshift/kubernetes#2730 |
|
@mkowalski: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/54336a50-9a21-11f1-86eb-41ee0bc7cc69-0 |
Payload validation results: this PR + openshift/kubernetes#2730 combined10x
Conclusions
Note: the aggregator reported FAILURE, but for reasons unrelated to this change — all 9 runs uniformly failed the This comment was generated using AI. Please verify before acting on it. |
|
/retest-required |
|
/hold cancel |
|
@mkowalski: The following test failed, say
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. |
What
Tunes the health-check parameters of the on-prem API VIP haproxy
mastersbackend (single server-line change in the MCO template):rise/readyzprobes (+10s buffer) before re-adding a rebooted masterweight/slowstartfall/fastinteron-marked-down shutdown-sessionsWhy
On metal-ipi upgrades, the kube-apiserver on a freshly rebooted master passes
/readyz(core API works over host network) ~20-30s before the node's OVN pod network converges. Withrise 1, haproxy re-adds it to the VIP rotation on a single passing probe and immediately routes ~1/3 of new connections to it; requests proxied to aggregated APIs (oauth-apiserver, openshift-apiserver) hang, and broken http2 backend connections stay pinned for up to 45s, producing 10-15s ofoauth-api-new-connectionsdisruption in ~30-50% of master-updating upgrade runs. Full analysis in OCPBUGS-100065.This is a downstream mitigation for the routing half of the bug; the aggregator-side fixes are openshift/kubernetes#2730 (readyz reachability semantics) and openshift/kubernetes#2732 (fast http2 dead-connection detection, being upstreamed via kubernetes/kubernetes#141318).
Expected impact / validation
slowstartreduces the probability of a new connection landing on the not-yet-converged kas during the vulnerable ~40-70s window from ~33% to a few percent early in the window. We will benchmark by running dozens of pj-rehearse runs ofe2e-metal-ipi-upgrade-ovn-ipv6/e2e-metal-ipi-ovn-upgrade-runcand comparingoauth-api-new-connectionsdisruption totals against baseline (baseline data in the Jira).Risk
shutdown-sessionskills established client connections when a master is marked down; clients reconnect via the VIP to healthy masters. This is intentionally aggressive to shrink VIP-failover disruption episodes and is called out for reviewer attention.pkg/controller/templaterender tests pass.This PR description was generated using AI. Please verify before acting on it.
Summary by CodeRabbit