Skip to content

OCPBUGS-85677, OCPBUGS-90541: Don't set Progressing=False until all pods available#3034

Open
mdbooth wants to merge 2 commits into
openshift:masterfrom
mdbooth:fix-progressing-false-timing
Open

OCPBUGS-85677, OCPBUGS-90541: Don't set Progressing=False until all pods available#3034
mdbooth wants to merge 2 commits into
openshift:masterfrom
mdbooth:fix-progressing-false-timing

Conversation

@mdbooth

@mdbooth mdbooth commented Jun 20, 2026

Copy link
Copy Markdown

We don't want the ClusterOperator to report Progressing=True whenever a Node reboots. However, we also don't want to report Progressing=False during a CNI rollout until all pods are available. This change ensures both are covered.

Related to openshift/origin#31320

Adds a networkoperator.openshift.io/observed-stable-generation annotation to CNO operands when they are observed stable. Unlike the copy of the object's status temporarily stored in a ClusterOperator annotation during a rollout, this is persistent state.

With this change, an operand is rolling out if:

  • Its observed generation does not match its generation
  • It is not currently available and it has never been observed stable at this generation

That is, a rollout completes once we have observed a stable rollout at a particular generation at least once. Therefore:

  • We only go Progressing=False once all pods are available
  • We do not subsequently go Progressing=False unless the operand's generation changes, i.e. a for a spec change

This is v2 of this PR, but I have left the original commit in place for comparison and in case we want to roll back to it. The reasons for v2 are explained in #3034 (comment)

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes

    • Improved status messaging and condition handling for DaemonSets, StatefulSets, and Deployments when pods are temporarily unavailable, separating rollout progress from reboot/churn scenarios.
    • Enhanced detection of CrashLoopBackOff during these phases to improve failure reporting.
    • Added persistence to “observed stable” tracking so stability is retained across status-manager updates.
  • Tests

    • Expanded automated coverage for “awaiting pod/node availability,” including timing behavior and persistence across restarts.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jun 20, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (core-networking-bot@redhat.com), skipping review request.

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

Details

In response to this:

We don't want the ClusterOperator to report Progressing=True whenever a Node reboots. However, we also don't want to report Progressing=False during a CNI rollout until all pods are available. This change ensures both are covered.

Related to openshift/origin#31320

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

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 2bd0fb0b-ce23-4b5f-985d-ff2012f98b20

📥 Commits

Reviewing files that changed from the base of the PR and between 9f93b53 and 4f149a4.

📒 Files selected for processing (3)
  • pkg/controller/statusmanager/pod_status.go
  • pkg/controller/statusmanager/status_manager_test.go
  • pkg/names/names.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/names/names.go
  • pkg/controller/statusmanager/pod_status.go
  • pkg/controller/statusmanager/status_manager_test.go

Walkthrough

The status manager now records stable generations in an annotation, uses that state to drive rollout messaging for DaemonSets, StatefulSets, and Deployments, and updates tests and fixtures to preserve and assert the new behavior.

Changes

Observed-stable rollout tracking

Layer / File(s) Summary
Annotation contract and stability check
pkg/names/names.go, pkg/controller/statusmanager/pod_status.go
Defines ObservedStableGenerationAnnotation and adds the stability check that compares it with metadata.generation.
Workload status handling
pkg/controller/statusmanager/pod_status.go
Updates DaemonSet, StatefulSet, and Deployment status branches to use observed-stable state, persist the annotation on stable workloads, and use the controller clock for hung-rollout timestamps.
Test helpers and rollout assertions
pkg/controller/statusmanager/status_manager_test.go
Preserves annotations and resource versions in fake-client helpers, and updates DaemonSet rollout assertions and related fixtures for the tracked rollout state.
Progressing behavior coverage
pkg/controller/statusmanager/status_manager_test.go
Adds table-driven coverage for observed-stable progression across workload types and updates deployment restart/restore fixtures to match the new state model.

Sequence Diagram(s)

sequenceDiagram
  participant SetFromPods
  participant WorkloadStatus
  participant ObjectAnnotation
  SetFromPods->>WorkloadStatus: evaluate available/unavailable status
  WorkloadStatus->>ObjectAnnotation: read or set observed-stable-generation
  ObjectAnnotation-->>SetFromPods: stable state for progression handling
Loading

Estimated code review effort: 4 (Complex) | ~45 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 54.55% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: delaying Progressing=False until all pods are available.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed No Ginkgo titles were added; the new subtest names are static literals like 'New Deployment observed stable' and contain no dynamic data.
Test Structure And Quality ✅ Passed No Ginkgo code here; the touched tests use fake clients/subtests, bounded waits, and mostly contextual failure messages.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e specs were added; the modified test file is plain Go unit tests (testing.T) and has no It/Describe/Context/When blocks.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Changed tests are plain Go unit tests in pkg/controller/statusmanager; no Ginkgo/e2e code or SNO assumptions were added, so the check doesn't apply.
Topology-Aware Scheduling Compatibility ✅ Passed Touched files only change status/annotation handling and tests; no affinity, nodeSelector, spread, replica, or topology-based scheduling logic was added.
Ote Binary Stdout Contract ✅ Passed No stdout writes were added in process-level code; the only init change registers schemes, and added logging stays inside test bodies.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only Go unit tests changed; no Ginkgo e2e cases or IPv4/external-network assumptions were added.
No-Weak-Crypto ✅ Passed Touched diff only adds rollout/status annotation logic; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons appear.
Container-Privileges ✅ Passed No touched files add privileged/hostPID/hostNetwork/hostIPC/SYS_ADMIN/allowPrivilegeEscalation settings, and the PR only changes Go status logic/tests/constants.
No-Sensitive-Data-In-Logs ✅ Passed No new sensitive data is logged; added logs only reference object names/errors and the new annotation key, not secrets or PII.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: go: inconsistent vendoring in :\n\tgithub.com/Masterminds/semver@v1.5.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/Masterminds/sprig/v3@v3.2.3: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/containernetworking/cni@v0.8.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/ghodss/yaml@v1.0.1-0.20190212211648-25d852aebe32: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/go-bindata/go-bindata@v3.1.2+incompatible: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/onsi/gomega@v1.39.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/ope

... [truncated 17357 characters] ...

red in go.mod, but not marked as explicit in vendor/modules.txt\n\tk8s.io/gengo/v2@v2.0.0-20251215205346-5ee0d033ba5b: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tk8s.io/kms@v0.35.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tk8s.io/kube-aggregator@v0.35.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tsigs.k8s.io/randfill@v1.0.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tsigs.k8s.io/structured-merge-diff/v6@v6.3.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\n\tTo ignore the vendor directory, use -mod=readonly or -mod=mod.\n\tTo sync the vendor directory, run:\n\t\tgo mod vendor\n"


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/controller/statusmanager/pod_status.go`:
- Around line 172-188: The condition on line 172 requires ReadyReplicas > 0 to
treat a StatefulSet as having an active rollout, but when hadState is true
(indicating tracked state from a previous rollout) and ReadyReplicas is 0 while
UpdatedReplicas equals Replicas, the StatefulSet falls out of the
rollout-in-progress path prematurely, clearing tracked state before pods
recover. Modify the condition to also handle the zero-ready availability case by
checking if we have tracked state or an active rollout regardless of whether
ReadyReplicas is greater than zero, ensuring that pending pods waiting to become
ready are properly tracked as progressing rather than being reported as
non-progressing.

In `@pkg/controller/statusmanager/status_manager_test.go`:
- Around line 2388-2390: The test file hardcodes the release version annotation
as "v1.0.0" while the rollout logic reads the actual RELEASE_VERSION environment
variable. This mismatch causes test assertions to fail when the environment
variable differs from the hardcoded value. Replace all hardcoded "v1.0.0" values
in the Annotations map with the "release.openshift.io/version" key at all
locations (lines 2388-2390, 2562-2564, 2653-2655, 2766-2768, and 2882-2884) by
retrieving the actual RELEASE_VERSION environment variable value using os.Getenv
and using that value instead. This ensures the test annotations match what the
rollout logic actually reads from the environment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 4d9ebdf1-4112-4d54-a0f5-168c3667049c

📥 Commits

Reviewing files that changed from the base of the PR and between c376140 and d343fbc.

📒 Files selected for processing (2)
  • pkg/controller/statusmanager/pod_status.go
  • pkg/controller/statusmanager/status_manager_test.go

Comment thread pkg/controller/statusmanager/pod_status.go Outdated
Comment thread pkg/controller/statusmanager/status_manager_test.go Outdated
@mdbooth

mdbooth commented Jun 20, 2026

Copy link
Copy Markdown
Author

/retest-required

@mdbooth

mdbooth commented Jun 20, 2026

Copy link
Copy Markdown
Author

Pods are crashlooping due to:

 2026-06-20T18:21:33.522142681Z /usr/libexec/ipsec/addconn: /lib64/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by /usr/libexec/ipsec/addconn)

Tracked in https://issues.redhat.com/browse/OCPBUGS-89238

We don't want the ClusterOperator to report Progressing=True whenever a
Node reboots. However, we also don't want to report Progressing=False
during a CNI rollout until all pods are available. This change ensures
both are covered.
@mdbooth mdbooth force-pushed the fix-progressing-false-timing branch from d343fbc to 6812a1e Compare June 20, 2026 20:44
@pperiyasamy

Copy link
Copy Markdown
Member

/assign @danwinship @jluhrsen

@jluhrsen

Copy link
Copy Markdown
Contributor

/assign @danwinship @jluhrsen

@mdbooth @danwinship ,

according to claude this PR is also fixing OCPBUGS-85677 which I was chasing with this #3018.

Should I close 3018 and dup OCPBUGS-85677 to OCPBUGS-90541 ?

@jluhrsen

Copy link
Copy Markdown
Contributor

/retest

@jluhrsen

Copy link
Copy Markdown
Contributor

/payload-aggregate periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec 10

@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@jluhrsen: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/66eaf760-7052-11f1-8ba4-dea2a7eefeae-0

@jluhrsen

Copy link
Copy Markdown
Contributor

/payload-aggregate periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec 10

@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@jluhrsen: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/cfe9ea30-70ae-11f1-8306-a6764354848f-0

@jluhrsen

Copy link
Copy Markdown
Contributor

/payload-aggregate periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec 10

/retest

@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@jluhrsen: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/c728f6b0-717c-11f1-8aed-1c98979481b0-0

@jluhrsen

Copy link
Copy Markdown
Contributor

/payload-aggregate periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec 10

@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@jluhrsen: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/4d13ebd0-71b0-11f1-8ec6-39f7ceeeb643-0

@jluhrsen

Copy link
Copy Markdown
Contributor

/payload-aggregate periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec 10

/retest

@openshift-ci

openshift-ci Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

@jluhrsen: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/e1ee8920-725c-11f1-90a8-66ef2ab22b57-0

@mdbooth

mdbooth commented Jun 29, 2026

Copy link
Copy Markdown
Author

@jluhrsen: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/e1ee8920-725c-11f1-90a8-66ef2ab22b57-0

@jluhrsen This was green.

@jluhrsen

Copy link
Copy Markdown
Contributor

@jluhrsen: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/e1ee8920-725c-11f1-90a8-66ef2ab22b57-0

@jluhrsen This was green.

yes. we have 50 results now from the aggregate jobs and now of them showed the network operator as Progressing=True when it should not have.

I marked OCPBUGS-85677 as a duplicate of OCPBUGS-90541 and closed my original PR in favor of this one

/lgtm

/verified by aggregate jobs

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 29, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@jluhrsen: This PR has been marked as verified by aggregate jobs.

Details

In response to this:

@jluhrsen: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-ipsec

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/e1ee8920-725c-11f1-90a8-66ef2ab22b57-0

@jluhrsen This was green.

yes. we have 50 results now from the aggregate jobs and now of them showed the network operator as Progressing=True when it should not have.

I marked OCPBUGS-85677 as a duplicate of OCPBUGS-90541 and closed my original PR in favor of this one

/lgtm

/verified by aggregate jobs

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 openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 29, 2026
@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jluhrsen, mdbooth
Once this PR has been reviewed and has the lgtm label, please ask for approval from danwinship. 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

@mdbooth

mdbooth commented Jun 30, 2026

Copy link
Copy Markdown
Author

/retest-required

@jluhrsen

jluhrsen commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

/retitle OCPBUGS-85677, OCPBUGS-90541: Don't set Progressing=False until all pods available

/retest

@openshift-ci openshift-ci Bot changed the title OCPBUGS-90541: Don't set Progressing=False until all pods available OCPBUGS-85677, OCPBUGS-90541: Don't set Progressing=False until all pods available Jul 6, 2026
@openshift-ci-robot openshift-ci-robot added jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. and removed jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jul 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@mdbooth: This pull request references Jira Issue OCPBUGS-85677, which is invalid:

  • expected the bug to be open, but it isn't
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Closed (Duplicate) 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.

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

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (core-networking-bot@redhat.com), skipping review request.

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

Details

In response to this:

We don't want the ClusterOperator to report Progressing=True whenever a Node reboots. However, we also don't want to report Progressing=False during a CNI rollout until all pods are available. This change ensures both are covered.

Related to openshift/origin#31320

Confirmed with a multi-pr test that it fixes the origin test.

Summary by CodeRabbit

  • Bug Fixes

  • Improved status logic to better distinguish “rollout in progress” from reboot/churn for DaemonSets, StatefulSets, and Deployments, including more accurate Progressing and Degraded behavior when pods are temporarily unavailable.

  • Enhanced pod failure detection during these rollout phases by tracking and identifying CrashLoopBackOff conditions.

  • Corrected progress transitions when pods become unavailable without prior rollout tracking, treating the scenario as churn instead of rollout.

  • Tests

  • Added coverage for “awaiting pod availability,” including behavior during timeouts and persistence across StatusManager restarts.

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.

@jluhrsen

jluhrsen commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

/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 Jul 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (core-networking-bot@redhat.com), skipping review request.

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.

@mdbooth

mdbooth commented Jul 7, 2026

Copy link
Copy Markdown
Author

The direct cause of the ipsec failures is https://redhat.atlassian.net/browse/OCPBUGS-89238

However, I've noticed an additional problem here. Other jobs are currently passing the install step in CI even though the ipsec DS never becomes stable. This is because of a related bug in the rollout code:

How the old code was always broken:

The original rollout renders the ovn-ipsec-host with IPsecServiceCheckOnHost=false. This rollout is successful, presumably because the IPsec config isn't rendered. However, the DS has now been annotated with installComplete=True.

MCO is updated to add ipsec. Nodes reboot, etc, etc. CNO observes the new MachineConfig and re-renders the ovn-ipsec-host ds with ipsec included. This crash loops immediately.

HOWEVER, because the ds had previously rendered successfully, it is still annotated with installComplete=true. Also dsRolloutActive= false because:

dsRolloutActive := !status.installComplete || ds.Status.UpdatedNumberScheduled < ds.Status.CurrentNumber
Scheduled

The pods are all scheduled: they're just crash looping.

So when we enter the if ds.Status.NumberUnavailable > 0 branch we don't do anything. This is deterministically broken.

How my new code usually works, but has a race:

My new patch uses hadState || dsRolloutActive as a 'currently rolling out' guard. It uses this to set Progressing if pods are unavailable while we're still rolling out, which is what we want.

However, it has a race. hadState will only be true if we were lucky enough to observe the mid-rollout state when ds.Status.UpdatedNumberScheduled < ds.Status.CurrentNumberScheduled. This has no other guards and will set us Progressing=True, which results in state being written.

If we're unlucky and don't observe that state, e.g. because CNO happen to be running on the control plane node which was rebooted first, we will never reset the state on the ds which enables us to know we're rolling out again.

A better fix

I'm going to push a new proposed fix which adds a new annotation: networkoperator.openshift.io/observed-stable-generation. We only write this annotation in SetFromPods when the DS/SS/D is observed stable, and it's set to the object's Generation. This means it is invalidated by any spec change, which will ensure we go Progressing=True until we have observed that the new spec is stable. It is unaffected anything which doesn't change the generation, e.g. a node reboot, which is also what we want.

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2026
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Jul 7, 2026
@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@mdbooth: This pull request references Jira Issue OCPBUGS-85677, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (core-networking-bot@redhat.com), skipping review request.

Details

In response to this:

We don't want the ClusterOperator to report Progressing=True whenever a Node reboots. However, we also don't want to report Progressing=False during a CNI rollout until all pods are available. This change ensures both are covered.

Related to openshift/origin#31320

Confirmed with a multi-pr test that it fixes the origin test.

Summary by CodeRabbit

  • Bug Fixes
  • Improved status reporting to more reliably separate “rollout in progress” from reboot/churn for DaemonSets, StatefulSets, and Deployments.
  • Enhanced “awaiting available pods/nodes” messaging and improved detection/handling of CrashLoopBackOff conditions during rollout phases.
  • Progress tracking now persists across controller restarts to keep Progressing/Degraded behavior consistent.
  • Tests
  • Expanded and adjusted status-manager coverage with new progression scenarios (including awaiting availability) and fake-clock-based timing.

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 coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
pkg/controller/statusmanager/status_manager_test.go (1)

106-112: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Annotation merge is a no-op and drops obj's own annotations.

merged := current.GetAnnotations() followed by maps.Copy(merged, current.GetAnnotations()) copies the server map onto itself — a no-op. obj.SetAnnotations(merged) then replaces obj's annotations with only the server's, discarding any annotation the test set on obj. Today this is masked because annotated fixtures hit the Create branch, but the update path silently loses test-set annotations. The intended merge was almost certainly overlaying obj's annotations onto the server's.

♻️ Proposed fix
-	// Avoid wiping annotations added by SetFromPods.
-	merged := current.GetAnnotations()
-	if merged == nil {
-		merged = map[string]string{}
-	}
-	maps.Copy(merged, current.GetAnnotations())
-	obj.SetAnnotations(merged)
+	// Avoid wiping annotations added by SetFromPods: start from the
+	// server's annotations, then overlay any set on obj by the test.
+	merged := current.GetAnnotations()
+	if merged == nil {
+		merged = map[string]string{}
+	}
+	maps.Copy(merged, obj.GetAnnotations())
+	obj.SetAnnotations(merged)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/controller/statusmanager/status_manager_test.go` around lines 106 - 112,
The annotation merge in the status manager test is using the server annotations
as both source and destination, so it becomes a no-op and drops any annotations
already set on obj. Update the merge in the status manager update path to start
from current.GetAnnotations() and then copy obj.GetAnnotations() into that map
before calling obj.SetAnnotations; this keeps the server annotations while
preserving test-set annotations. Use the existing obj, current.GetAnnotations(),
maps.Copy, and obj.SetAnnotations flow in status_manager_test.go to locate the
change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/controller/statusmanager/status_manager_test.go`:
- Around line 1876-1899: Update the assertions in status_manager_test.go so the
failure messages reflect the actual table-driven case being tested. In the
Progressing condition check around conditionsInclude, replace the hardcoded
DaemonSet-specific message with one that uses the current test case context from
tt so it works for DaemonSet, Deployment, StatefulSet, and both true/false
expectations. In the observed stable generation assertion, keep comparing
against tt.object.GetGeneration() but change the failure text to print that same
expected value instead of tt.observedStableGeneration so the message matches the
assertion.

---

Nitpick comments:
In `@pkg/controller/statusmanager/status_manager_test.go`:
- Around line 106-112: The annotation merge in the status manager test is using
the server annotations as both source and destination, so it becomes a no-op and
drops any annotations already set on obj. Update the merge in the status manager
update path to start from current.GetAnnotations() and then copy
obj.GetAnnotations() into that map before calling obj.SetAnnotations; this keeps
the server annotations while preserving test-set annotations. Use the existing
obj, current.GetAnnotations(), maps.Copy, and obj.SetAnnotations flow in
status_manager_test.go to locate the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 23c5ddf5-6160-4e80-993c-a5cb32e43e70

📥 Commits

Reviewing files that changed from the base of the PR and between 6812a1e and 9f93b53.

📒 Files selected for processing (3)
  • pkg/controller/statusmanager/pod_status.go
  • pkg/controller/statusmanager/status_manager_test.go
  • pkg/names/names.go
✅ Files skipped from review due to trivial changes (1)
  • pkg/names/names.go

Comment thread pkg/controller/statusmanager/status_manager_test.go
@mdbooth

mdbooth commented Jul 7, 2026

Copy link
Copy Markdown
Author

/test e2e-aws-ovn-hypershift-conformance hypershift-e2e-aks

@mdbooth

mdbooth commented Jul 8, 2026

Copy link
Copy Markdown
Author

/retest-required

Adds a networkoperator.openshift.io/observed-stable-generation
annotation to CNO operands when they are observed stable. Unlike the
copy of the object's status temporarily stored in a ClusterOperator
annotation during a rollout, this is persistent state.

With this change, an operand is rolling out if:
* Its observed generation does not match its generation
* It is not currently available and it has never been observed stable at
  this generation

That is, a rollout completes once we have observed a stable rollout at a
particular generation at least once. Therefore:
* We only go Progressing=False once all pods are available
* We do not subsequently go Progressing=False unless the operand's
  generation changes, i.e. a for a spec change
@mdbooth mdbooth force-pushed the fix-progressing-false-timing branch from 9f93b53 to 4f149a4 Compare July 8, 2026 15:16
@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@mdbooth: The following tests 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/e2e-aws-ovn-hypershift-conformance 4f149a4 link true /test e2e-aws-ovn-hypershift-conformance
ci/prow/e2e-azure-ovn-upgrade 4f149a4 link true /test e2e-azure-ovn-upgrade
ci/prow/e2e-metal-ipi-ovn-ipv6-ipsec 4f149a4 link true /test e2e-metal-ipi-ovn-ipv6-ipsec
ci/prow/e2e-aws-ovn-upgrade-ipsec 4f149a4 link true /test e2e-aws-ovn-upgrade-ipsec
ci/prow/5.0-upgrade-from-stable-4.22-e2e-azure-ovn-upgrade 4f149a4 link false /test 5.0-upgrade-from-stable-4.22-e2e-azure-ovn-upgrade
ci/prow/e2e-ovn-ipsec-step-registry 4f149a4 link true /test e2e-ovn-ipsec-step-registry
ci/prow/5.0-upgrade-from-stable-4.22-e2e-gcp-ovn-upgrade 4f149a4 link false /test 5.0-upgrade-from-stable-4.22-e2e-gcp-ovn-upgrade
ci/prow/5.0-upgrade-from-stable-4.22-e2e-aws-ovn-upgrade 4f149a4 link false /test 5.0-upgrade-from-stable-4.22-e2e-aws-ovn-upgrade
ci/prow/e2e-aws-ovn-rhcos10-techpreview 4f149a4 link false /test e2e-aws-ovn-rhcos10-techpreview
ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw 4f149a4 link true /test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
ci/prow/e2e-metal-ipi-ovn-dualstack-bgp 4f149a4 link true /test e2e-metal-ipi-ovn-dualstack-bgp
ci/prow/hypershift-e2e-aks 4f149a4 link true /test hypershift-e2e-aks
ci/prow/e2e-gcp-ovn 4f149a4 link true /test e2e-gcp-ovn

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.

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

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants