Skip to content

WIP#5778

Draft
isabella-janssen wants to merge 1 commit intoopenshift:release-4.19from
isabella-janssen:fix-pr5688-rollback-bug
Draft

WIP#5778
isabella-janssen wants to merge 1 commit intoopenshift:release-4.19from
isabella-janssen:fix-pr5688-rollback-bug

Conversation

@isabella-janssen
Copy link
Member

PR #5688 introduced a bug in the rollback logic for systemd unit updates. When an update fails and needs to roll back, the code was using the forward-direction unit diffs (old->new) instead of recalculating the reverse-direction diffs (new->old). This caused incomplete rollbacks that could leave systemd units in an inconsistent state.

This issue manifested during upgrades where kube-apiserver pods failed to terminate gracefully, likely because kubelet or related systemd units weren't properly restored during rollback.

The fix ensures that:

  1. In updateOnClusterLayering: configs are properly swapped (was using oldIgnConfig->newIgnConfig, now uses newIgnConfig->oldIgnConfig)
  2. In all three update functions: unit diffs are recalculated for the rollback direction (new->old) to ensure only the correct units are written during rollback

Related: OCPBUGS-77221, OCPBUGS-58023
Test failure: periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-fips

- What I did

- How to verify it

- Description for the changelog

PR openshift#5688 introduced a bug in the rollback logic for systemd unit updates.
When an update fails and needs to roll back, the code was using the
forward-direction unit diffs (old->new) instead of recalculating the
reverse-direction diffs (new->old). This caused incomplete rollbacks
that could leave systemd units in an inconsistent state.

This issue manifested during upgrades where kube-apiserver pods failed
to terminate gracefully, likely because kubelet or related systemd units
weren't properly restored during rollback.

The fix ensures that:
1. In updateOnClusterLayering: configs are properly swapped (was using
   oldIgnConfig->newIgnConfig, now uses newIgnConfig->oldIgnConfig)
2. In all three update functions: unit diffs are recalculated for the
   rollback direction (new->old) to ensure only the correct units are
   written during rollback

Related: OCPBUGS-77221, OCPBUGS-58023
Test failure: periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-fips

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 18, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Excluded labels (none allowed) (1)
  • do-not-merge/work-in-progress

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b14473be-82f7-47d6-8a23-c50f2253bfad

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
📝 Coding Plan
  • Generate coding plan for human review comments

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

@isabella-janssen
Copy link
Member Author

/payload-job periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-ovn-upgrade-fips

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2026

@isabella-janssen: 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-fips

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/8c879890-22f3-11f1-8dd6-21b60c063f9a-0

@isabella-janssen
Copy link
Member Author

/payload-job periodic-ci-openshift-release-main-nightly-4.19-e2e-aws-ovn-upgrade-fips

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2026

@isabella-janssen: 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.19-e2e-aws-ovn-upgrade-fips

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/933271b0-22f3-11f1-9079-205649f0ebe8-0

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: isabella-janssen

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 Mar 18, 2026
@isabella-janssen
Copy link
Member Author

/payload-aggregate periodic-ci-openshift-release-main-nightly-4.19-e2e-aws-ovn-upgrade-fips 7

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 19, 2026

@isabella-janssen: 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.19-e2e-aws-ovn-upgrade-fips

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/d4ec9fd0-23c6-11f1-9fd3-a09afc387bd4-0

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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant