Skip to content

Conversation

@pablintino
Copy link
Contributor

Fixed: OCPBUGS-71196

- What I did

This is a manual cherry-pick of the fixes introduced for OCPBUGS-72396 and OCPBUGS-70259.

Check if a systemd unit exists on the system before attempting to enable or disable it, even when the unit has no content in the MachineConfig. This prevents errors when managing pre-existing system units.

- How to verify it

  1. Deploy a 4.21 cluster with this change.
  2. Ensure the kdump service is disabled in the worker nodes (it's disabled by default).
  3. Apply the following MC:
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: 99-worker-custom-enable-kdump
spec:
  config:
    ignition:
      version: 3.1.0
    systemd:
      units:
      - enabled: true
        name: kdump.service  
  1. Wait for the worker MCP to finish the update.
  2. Check on a worker node that the kdump service is now enabled.

- Description for the changelog

Ensure OS provided units can be enabled with empty Ignition units.

Check if a systemd unit exists on the system before attempting to enable or
disable it, even when the unit has no content in the MachineConfig. This
prevents errors when managing pre-existing system units.

This is a manual cherry-pick of the fixes introduced for OCPBUGS-72396
and OCPBUGS-70259.

Signed-off-by: Pablo Rodriguez Nava <[email protected]>
@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/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 16, 2026
@openshift-ci-robot
Copy link
Contributor

@pablintino: This pull request references Jira Issue OCPBUGS-71196, 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.

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:

Fixed: OCPBUGS-71196

- What I did

This is a manual cherry-pick of the fixes introduced for OCPBUGS-72396 and OCPBUGS-70259.

Check if a systemd unit exists on the system before attempting to enable or disable it, even when the unit has no content in the MachineConfig. This prevents errors when managing pre-existing system units.

- How to verify it

  1. Deploy a 4.21 cluster with this change.
  2. Ensure the kdump service is disabled in the worker nodes (it's disabled by default).
  3. Apply the following MC:
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
 labels:
   machineconfiguration.openshift.io/role: worker
 name: 99-worker-custom-enable-kdump
spec:
 config:
   ignition:
     version: 3.1.0
   systemd:
     units:
     - enabled: true
       name: kdump.service  
  1. Wait for the worker MCP to finish the update.
  2. Check on a worker node that the kdump service is now enabled.

- Description for the changelog

Ensure OS provided units can be enabled with empty Ignition units.

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 16, 2026
@pablintino pablintino changed the title OCPBUGS-71196: Enable existing units without content [release-4.21] OCPBUGS-71196: Enable existing units without content Jan 16, 2026
@djoshy
Copy link
Contributor

djoshy commented Jan 16, 2026

/lgtm

/label backport-risk-assessed

seems sane to me!

@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 Jan 16, 2026
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 16, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: djoshy, pablintino

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 Jan 16, 2026

@pablintino: 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/bootstrap-unit 86f0b36 link false /test bootstrap-unit

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.

@pablintino
Copy link
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 Jan 16, 2026
@openshift-ci-robot
Copy link
Contributor

@pablintino: This pull request references Jira Issue OCPBUGS-71196, 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.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-70259 is in the state Verified, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-70259 targets the "4.22.0" version, which is one of the valid target versions: 4.22.0
  • 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:

/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.

@openshift-ci openshift-ci bot requested a review from sergiordlr January 16, 2026 20:11
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.