Skip to content

OCPBUGS-84177: Handle zero-worker HyperShift clusters in daemonset rollout [4.19 backport]#2974

Open
weliang1 wants to merge 2 commits intoopenshift:release-4.19from
weliang1:OCPBUGS-84177-backport-4.19
Open

OCPBUGS-84177: Handle zero-worker HyperShift clusters in daemonset rollout [4.19 backport]#2974
weliang1 wants to merge 2 commits intoopenshift:release-4.19from
weliang1:OCPBUGS-84177-backport-4.19

Conversation

@weliang1
Copy link
Copy Markdown
Contributor

Summary

Backport of #2897 to release-4.19

This PR fixes control-plane upgrade blocking in zero-worker HyperShift clusters by:

  • Adding early return in daemonSetProgressing() when DesiredNumberScheduled == 0
  • Treating rollout as complete when there are no nodes to schedule pods on

Problem

In zero-worker HyperShift clusters, the ovnkube-node DaemonSet has no pods to roll out. The existing logic in daemonSetProgressing() would return true indefinitely because NumberAvailable == 0, blocking control-plane upgrades waiting for a node rollout that will never complete.

Solution

Add an early check for DesiredNumberScheduled == 0 and return false (not progressing) since there is nothing to roll out.

Backport Details

Cherry-picked commits

  1. 4fe8ca6 - Handle zero-worker HyperShift clusters in daemonset rollout
  2. 04718f8 - Address CodeRabbit review: add docstring and assertion messages

🤖 Generated with Claude Code

weliang1 and others added 2 commits April 24, 2026 11:54
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>
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 24, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@weliang1: This pull request references Jira Issue OCPBUGS-84177, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-84177 to depend on a bug targeting a version in 4.20.0, 4.20.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

Backport of #2897 to release-4.19

This PR fixes control-plane upgrade blocking in zero-worker HyperShift clusters by:

  • Adding early return in daemonSetProgressing() when DesiredNumberScheduled == 0
  • Treating rollout as complete when there are no nodes to schedule pods on

Problem

In zero-worker HyperShift clusters, the ovnkube-node DaemonSet has no pods to roll out. The existing logic in daemonSetProgressing() would return true indefinitely because NumberAvailable == 0, blocking control-plane upgrades waiting for a node rollout that will never complete.

Solution

Add an early check for DesiredNumberScheduled == 0 and return false (not progressing) since there is nothing to roll out.

Backport Details

Cherry-picked commits

  1. 4fe8ca6 - Handle zero-worker HyperShift clusters in daemonset rollout
  2. 04718f8 - Address CodeRabbit review: add docstring and assertion messages

🤖 Generated with Claude Code

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0dff1e7b-3377-4912-83a6-72a6984e8117

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 24, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: weliang1
Once this PR has been reviewed and has the lgtm label, please assign abhat for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@weliang1
Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@weliang1
Copy link
Copy Markdown
Contributor Author

/retest

@weliang1
Copy link
Copy Markdown
Contributor Author

/retest

@weliang1
Copy link
Copy Markdown
Contributor Author

/test 4.19-upgrade-from-stable-4.18-e2e-gcp-ovn-upgrade

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 30, 2026

@weliang1: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security 5c27d9c link false /test security

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@weliang1
Copy link
Copy Markdown
Contributor Author

/verified by @weliang1

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@weliang1: This PR has been marked as verified by @weliang1.

Details

In response to this:

/verified by @weliang1

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.

@weliang1
Copy link
Copy Markdown
Contributor Author

/test 4.19-upgrade-from-stable-4.18-e2e-gcp-ovn-upgrade

@weliang1
Copy link
Copy Markdown
Contributor Author

weliang1 commented May 7, 2026

@kyrtapz Please override failed job and approve this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants