Skip to content

OCPBUGS-84176: Handle zero-worker HyperShift clusters in daemonset rollout [4.20 backport] - #2973

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:release-4.20from
weliang1:OCPBUGS-84176-backport-4.20
May 14, 2026
Merged

OCPBUGS-84176: Handle zero-worker HyperShift clusters in daemonset rollout [4.20 backport]#2973
openshift-merge-bot[bot] merged 2 commits into
openshift:release-4.20from
weliang1:OCPBUGS-84176-backport-4.20

Conversation

@weliang1

Copy link
Copy Markdown
Contributor

Summary

Backport of #2897 to release-4.20

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:53
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 the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 24, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@weliang1: This pull request references Jira Issue OCPBUGS-84176, 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-84176 to depend on a bug targeting a version in 4.21.0, 4.21.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.20

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.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Apr 24, 2026
@coderabbitai

coderabbitai Bot commented Apr 24, 2026

Copy link
Copy Markdown

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: 4dd30efc-f07b-42be-9a9d-b29aa24cb688

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.

@weliang1

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

@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 bfc78f2 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

/test e2e-aws-ovn-hypershift-conformance

@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

weliang1 commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

@kyrtapz Please override failed job and approve this PR.

@kyrtapz

kyrtapz commented May 7, 2026

Copy link
Copy Markdown
Contributor

/lgtm
/label backport-risk-assessed

@openshift-ci openshift-ci Bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label May 7, 2026
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 7, 2026
@openshift-ci

openshift-ci Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kyrtapz, weliang1

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2026
@kyrtapz

kyrtapz commented May 8, 2026

Copy link
Copy Markdown
Contributor

/hold
4.21 is not in yet

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 8, 2026
@weliang1

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

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.

Details

In response to this:

/jira refresh

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

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

  • expected dependent Jira Issue OCPBUGS-84169 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is MODIFIED instead

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.

Details

In response to this:

/jira refresh

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

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 14, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@weliang1: This pull request references Jira Issue OCPBUGS-84176, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-84169 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-84169 targets the "4.21.z" version, which is one of the valid target versions: 4.21.0, 4.21.z
  • bug has dependents
Details

In response to this:

/jira refresh

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

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 14, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 56c830e into openshift:release-4.20 May 14, 2026
26 of 27 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@weliang1: Jira Issue Verification Checks: Jira Issue OCPBUGS-84176
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-84176 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

Summary

Backport of #2897 to release-4.20

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.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants