OCPBUGS-84177: Handle zero-worker HyperShift clusters in daemonset rollout [4.19 backport]#2974
OCPBUGS-84177: Handle zero-worker HyperShift clusters in daemonset rollout [4.19 backport]#2974weliang1 wants to merge 2 commits intoopenshift:release-4.19from
Conversation
Fix daemonSetProgressing() to treat a DaemonSet with DesiredNumberScheduled == 0 as not progressing, by changing the condition from: status.NumberAvailable == 0 to: status.NumberAvailable == 0 && status.DesiredNumberScheduled > 0 This aligns with the existing logic in status_manager.go and fixes control-plane upgrade blocking in zero-worker HyperShift clusters, where the ovnkube-node DaemonSet has no pods to roll out and would otherwise block indefinitely. Add unit tests for daemonSetProgressing() covering the zero-worker case and existing progressing conditions.
- Add doc comment to TestDaemonSetProgressing describing its purpose - Add descriptive failure message to Gomega assertion so test failures report the case name and expected vs actual values Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@weliang1: This pull request references Jira Issue OCPBUGS-84177, 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: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: weliang1 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 |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/test 4.19-upgrade-from-stable-4.18-e2e-gcp-ovn-upgrade |
|
@weliang1: 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. |
|
/verified by @weliang1 |
|
@weliang1: 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. |
|
/test 4.19-upgrade-from-stable-4.18-e2e-gcp-ovn-upgrade |
|
@kyrtapz Please override failed job and approve this PR. |
Summary
Backport of #2897 to release-4.19
This PR fixes control-plane upgrade blocking in zero-worker HyperShift clusters by:
daemonSetProgressing()whenDesiredNumberScheduled == 0Problem
In zero-worker HyperShift clusters, the ovnkube-node DaemonSet has no pods to roll out. The existing logic in
daemonSetProgressing()would returntrueindefinitely becauseNumberAvailable == 0, blocking control-plane upgrades waiting for a node rollout that will never complete.Solution
Add an early check for
DesiredNumberScheduled == 0and returnfalse(not progressing) since there is nothing to roll out.Backport Details
Cherry-picked commits
4fe8ca6- Handle zero-worker HyperShift clusters in daemonset rollout04718f8- Address CodeRabbit review: add docstring and assertion messages🤖 Generated with Claude Code