Skip to content

[release-4.18] OCPBUGS-78056: Prevent unnecessary systemd unit disable#5758

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.18from
isabella-janssen:ocpbugs-58023-418
Mar 12, 2026
Merged

[release-4.18] OCPBUGS-78056: Prevent unnecessary systemd unit disable#5758
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.18from
isabella-janssen:ocpbugs-58023-418

Conversation

@isabella-janssen
Copy link
Member

Closes: OCPBUGS-78056

- What I did
This is a manual cherrypick of #5688 to squash some commits that were accidentally kept separate in the 4.19 backport.

- How to verify it
See #5148 (comment) and #5612 (comment) for verification details.

- Description for the changelog
OCPBUGS-78056: Prevent unnecessary systemd unit disable

@isabella-janssen isabella-janssen marked this pull request as ready for review March 11, 2026 14:06
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. 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 Mar 11, 2026
@openshift-ci-robot
Copy link
Contributor

@isabella-janssen: This pull request references Jira Issue OCPBUGS-78056, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.z) matches configured target version for branch (4.18.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-77221 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-77221 targets the "4.19.z" version, which is one of the valid target versions: 4.19.0, 4.19.z
  • bug has dependents

Requesting review from QA contact:
/cc @sergiordlr

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

Details

In response to this:

Closes: OCPBUGS-78056

- What I did
This is a manual cherrypick of #5688 to squash some commits that were accidentally kept separate in the 4.19 backport.

- How to verify it
See #5148 (comment) and #5612 (comment) for verification details.

- Description for the changelog
OCPBUGS-78056: Prevent unnecessary systemd unit disable

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

coderabbitai bot commented Mar 11, 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: Pro

Run ID: a3f94681-51e6-4cf3-9c89-1297f41ef045

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
  • Post copyable unit tests in a comment

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

@openshift-ci openshift-ci bot requested a review from sergiordlr March 11, 2026 14:06
@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 11, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 11, 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

@isabella-janssen isabella-janssen marked this pull request as draft March 11, 2026 14:06
@isabella-janssen isabella-janssen marked this pull request as ready for review March 11, 2026 14:07
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 11, 2026
@djoshy
Copy link
Contributor

djoshy commented Mar 11, 2026

/lgtm

/label backport-risk-assessed

Thank you for the fix-up!

@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 Mar 11, 2026
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 11, 2026
@openshift-ci openshift-ci bot requested a review from dkhater-redhat March 11, 2026 14:13
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 11, 2026
@isabella-janssen
Copy link
Member Author

/retest-required

update: only write added or updated systemd units unless forcefile exists then rewrite all systemd units
on_disk_validation: check if systemd units in config enabled correctly
tests: update MCN condition transition test to account for quick transitions through 'Unknown' state
(cherry picked from commit 4512ec4)
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 11, 2026
@isabella-janssen
Copy link
Member Author

/test unit

@djoshy
Copy link
Contributor

djoshy commented Mar 11, 2026

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 11, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 11, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: djoshy, 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
Copy link
Contributor

openshift-ci bot commented Mar 11, 2026

@isabella-janssen: all tests passed!

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.

@ptalgulk01
Copy link

Pre-merge verified:

Environment Setup:
OCP version: 4.18.0-0-2026-03-12-052220-test-ci-ln-71y2gwk-latest
Platform: AWS

Steps:
Executed below test-case related to config_drift

"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-46943-[P1][OnCLayer] Config Drift. Config file. [Serial]"
"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-46999-[P1] Config Drift. Config file permissions. [Serial]"
"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-47045-[P2] Config Drift. Compressed files. [Serial]"
"[sig-mco] MCO Author:sregidor-Longduration-NonPreRelease-High-47008-Config Drift. Dropin file. [Serial]"
"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-47009-Config Drift. New Service Unit. [Serial]"
"[sig-mco] MCO Author:ptalgulk-NonHyperShiftHOST-NonPreRelease-Longduration-High-74540-[P1][OnCLayer] kubelet does not start after reboot due to dependency issue[Disruptive] [Serial]"

Applied the below MC

oc apply -f - << EOF
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: check-worker
spec:
  config:
    ignition:
      version: 3.2.0
    systemd:
      units:
      - contents: |
          [Unit]
          Description=Restart the host
          [Service]
          Type=oneshot
          ExecStart=/usr/sbin/shutdown -r now
        enabled: true
        name: restart-host.service
      - contents: |
          [Unit]
          Description=Timer to gracefully restart the host
          [Timer]
          OnCalendar=*-*-* 02:00:00 UTC
          Persistent=true
          [Install]
          WantedBy=timers.target
        enabled: true
        name: restart-host.timer
EOF
machineconfig.machineconfiguration.openshift.io/check-worker created
  • checked the MCD logs after update
I0312 12:55:33.704626    2522 image_manager_helper.go:92] Running captured: systemctl is-enabled restart-host.service
I0312 12:55:33.710464    2522 image_manager_helper.go:92] Running captured: systemctl is-enabled restart-host.timer
  • Edited the the MC eg:
    OnCalendar=* 02:00:00 UTC to OnCalendar=* 04:00:00 UTC
  • Monitored the MCD logs and verified MCP update is complete.
  • No issues seen.

/label qe-approve
/verified by @ptalgulk01

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 12, 2026

@ptalgulk01: The label(s) /label qe-approve cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, ux-approved, no-qe, rebase/manual, cluster-config-api-changed, run-integration-tests, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, ok-to-test, stability-fix-approved, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

Details

In response to this:

Pre-merge verified:

Environment Setup:
OCP version: 4.18.0-0-2026-03-12-052220-test-ci-ln-71y2gwk-latest
Platform: AWS

Steps:
Executed below test-case related to config_drift

"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-46943-[P1][OnCLayer] Config Drift. Config file. [Serial]"
"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-46999-[P1] Config Drift. Config file permissions. [Serial]"
"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-47045-[P2] Config Drift. Compressed files. [Serial]"
"[sig-mco] MCO Author:sregidor-Longduration-NonPreRelease-High-47008-Config Drift. Dropin file. [Serial]"
"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-47009-Config Drift. New Service Unit. [Serial]"
"[sig-mco] MCO Author:ptalgulk-NonHyperShiftHOST-NonPreRelease-Longduration-High-74540-[P1][OnCLayer] kubelet does not start after reboot due to dependency issue[Disruptive] [Serial]"

Applied the below MC

oc apply -f - << EOF
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
 labels:
   machineconfiguration.openshift.io/role: worker
 name: check-worker
spec:
 config:
   ignition:
     version: 3.2.0
   systemd:
     units:
     - contents: |
         [Unit]
         Description=Restart the host
         [Service]
         Type=oneshot
         ExecStart=/usr/sbin/shutdown -r now
       enabled: true
       name: restart-host.service
     - contents: |
         [Unit]
         Description=Timer to gracefully restart the host
         [Timer]
         OnCalendar=*-*-* 02:00:00 UTC
         Persistent=true
         [Install]
         WantedBy=timers.target
       enabled: true
       name: restart-host.timer
EOF
machineconfig.machineconfiguration.openshift.io/check-worker created
  • checked the MCD logs after update
I0312 12:55:33.704626    2522 image_manager_helper.go:92] Running captured: systemctl is-enabled restart-host.service
I0312 12:55:33.710464    2522 image_manager_helper.go:92] Running captured: systemctl is-enabled restart-host.timer
  • Edited the the MC eg:
    OnCalendar=* 02:00:00 UTC to OnCalendar=* 04:00:00 UTC
  • Monitored the MCD logs and verified MCP update is complete.
  • No issues seen.

/label qe-approve
/verified by @ptalgulk01

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.

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

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

Details

In response to this:

Pre-merge verified:

Environment Setup:
OCP version: 4.18.0-0-2026-03-12-052220-test-ci-ln-71y2gwk-latest
Platform: AWS

Steps:
Executed below test-case related to config_drift

"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-46943-[P1][OnCLayer] Config Drift. Config file. [Serial]"
"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-46999-[P1] Config Drift. Config file permissions. [Serial]"
"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-47045-[P2] Config Drift. Compressed files. [Serial]"
"[sig-mco] MCO Author:sregidor-Longduration-NonPreRelease-High-47008-Config Drift. Dropin file. [Serial]"
"[sig-mco] MCO config drift Author:sregidor-Longduration-NonPreRelease-High-47009-Config Drift. New Service Unit. [Serial]"
"[sig-mco] MCO Author:ptalgulk-NonHyperShiftHOST-NonPreRelease-Longduration-High-74540-[P1][OnCLayer] kubelet does not start after reboot due to dependency issue[Disruptive] [Serial]"

Applied the below MC

oc apply -f - << EOF
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
 labels:
   machineconfiguration.openshift.io/role: worker
 name: check-worker
spec:
 config:
   ignition:
     version: 3.2.0
   systemd:
     units:
     - contents: |
         [Unit]
         Description=Restart the host
         [Service]
         Type=oneshot
         ExecStart=/usr/sbin/shutdown -r now
       enabled: true
       name: restart-host.service
     - contents: |
         [Unit]
         Description=Timer to gracefully restart the host
         [Timer]
         OnCalendar=*-*-* 02:00:00 UTC
         Persistent=true
         [Install]
         WantedBy=timers.target
       enabled: true
       name: restart-host.timer
EOF
machineconfig.machineconfiguration.openshift.io/check-worker created
  • checked the MCD logs after update
I0312 12:55:33.704626    2522 image_manager_helper.go:92] Running captured: systemctl is-enabled restart-host.service
I0312 12:55:33.710464    2522 image_manager_helper.go:92] Running captured: systemctl is-enabled restart-host.timer
  • Edited the the MC eg:
    OnCalendar=* 02:00:00 UTC to OnCalendar=* 04:00:00 UTC
  • Monitored the MCD logs and verified MCP update is complete.
  • No issues seen.

/label qe-approve
/verified by @ptalgulk01

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-merge-bot openshift-merge-bot bot merged commit cdf2711 into openshift:release-4.18 Mar 12, 2026
13 checks passed
@openshift-ci-robot
Copy link
Contributor

@isabella-janssen: Jira Issue Verification Checks: Jira Issue OCPBUGS-78056
✔️ 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-78056 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:

Closes: OCPBUGS-78056

- What I did
This is a manual cherrypick of #5688 to squash some commits that were accidentally kept separate in the 4.19 backport.

- How to verify it
See #5148 (comment) and #5612 (comment) for verification details.

- Description for the changelog
OCPBUGS-78056: Prevent unnecessary systemd unit disable

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.

@isabella-janssen isabella-janssen deleted the ocpbugs-58023-418 branch March 12, 2026 15:51
@isabella-janssen
Copy link
Member Author

/cherrypick release-4.17

@openshift-cherrypick-robot

@isabella-janssen: new pull request created: #5761

Details

In response to this:

/cherrypick release-4.17

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.

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/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. 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.