-
Notifications
You must be signed in to change notification settings - Fork 462
OCPBUGS-70259: Enable existing units without content #5520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Skipping CI for Draft Pull Request. |
|
@pablintino: This pull request references Jira Issue OCPBUGS-56648, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
/test all |
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.
68a24b3 to
84ed7b0
Compare
|
@pablintino: This pull request references Jira Issue OCPBUGS-70259, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
/jira refresh |
|
@pablintino: This pull request references Jira Issue OCPBUGS-70259, which is invalid:
Comment DetailsIn response to this:
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. |
|
/jira refresh |
|
@pablintino: This pull request references Jira Issue OCPBUGS-70259, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
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. |
|
@pablintino: This pull request references Jira Issue OCPBUGS-70259, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
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. |
|
Pre-merge verified Environment Setup Verification Steps:
MC Template$ oc create -f - << EOF
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: 99-worker-custom-enable-iscsid
spec:
config:
ignition:
version: 3.1.0
systemd:
units:
- enabled: true
name: iscsid.service
EOF
machineconfig.machineconfiguration.openshift.io/99-worker-custom-enable-iscsid created
$ oc get mcp
NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE
master rendered-master-e20a25e20499cff4b8167ec5cb1a1173 True False False 3 3 3 0 94m
worker rendered-worker-b3fc7cf06a65526f065243888362af77 True False False 3 3 3 0 94m
$ sh-5.1# chroot /host
sh-5.1# systemctl status iscsid.service
● iscsid.service - Open-iSCSI
Loaded: loaded (/usr/lib/systemd/system/iscsid.service; enabled; preset: disabled)
Active: active (running) since Mon 2026-01-05 09:32:12 UTC; 10min ago
TriggeredBy: ● iscsid.socket
Docs: man:iscsid(8)
man:iscsiuio(8)
man:iscsiadm(8)
Main PID: 1339 (iscsid)
Status: "Ready to process requests"
Tasks: 1 (limit: 99920)
Memory: 4.7M
CPU: 6ms
CGroup: /system.slice/iscsid.service
└─1339 /usr/sbin/iscsid -f
Jan 05 09:32:12 ip-10-0-13-136 systemd[1]: Starting Open-iSCSI...
Jan 05 09:32:12 ip-10-0-13-136 systemd[1]: Started Open-iSCSI.
sh-5.1# systemctl is-enabled iscsid.service
enabled
sh-5.1# systemctl is-active iscsid.service
active
sh-5.1# systemctl restart iscsid.service
sh-5.1# systemctl is-active iscsid.service
active
MC Template$ oc get mc 99-worker-custom-enable-kdump -o yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"machineconfiguration.openshift.io/v1","kind":"MachineConfig","metadata":{"annotations":{},"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"}]}},"kernelArguments":["crashkernel=256M"]}}
creationTimestamp: "2026-01-05T09:50:30Z"
generation: 2
labels:
machineconfiguration.openshift.io/role: worker
name: 99-worker-custom-enable-kdump
resourceVersion: "57770"
uid: 1b05c2d1-573d-4868-91b5-9d6e943bf9c2
spec:
config:
ignition:
version: 3.1.0
systemd:
units:
- enabled: true
name: kdump.service
kernelArguments:
- crashkernel=256M
$ oc debug node/ip-10-0-13-136.us-east-2.compute.internal
Starting pod/ip-10-0-13-136us-east-2computeinternal-debug-lztpk ...
To use host binaries, run `chroot /host`
Pod IP: 10.0.13.136
If you don't see a command prompt, try pressing enter.
sh-5.1# chroot /host
sh-5.1# systemctl status kdump.service
● kdump.service - Crash recovery kernel arming
Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; preset: disabled)
Active: active (exited) since Mon 2026-01-05 10:32:27 UTC; 2min 38s ago
Main PID: 1346 (code=exited, status=0/SUCCESS)
CPU: 24.295s
Jan 05 10:32:21 ip-10-0-13-136 dracut[1667]: Stored kernel commandline:
Jan 05 10:32:21 ip-10-0-13-136 dracut[1667]: No dracut internal kernel commandline stored in the initramfs
Jan 05 10:32:21 ip-10-0-13-136 dracut[1667]: *** Install squash loader ***
Jan 05 10:32:21 ip-10-0-13-136 dracut[1667]: *** Squashing the files inside the initramfs ***
Jan 05 10:32:26 ip-10-0-13-136 dracut[1667]: *** Squashing the files inside the initramfs done ***
Jan 05 10:32:26 ip-10-0-13-136 dracut[1667]: *** Creating image file '/var/lib/kdump/initramfs-5.14.0-570.76.1.el9_6.x86_64>
Jan 05 10:32:27 ip-10-0-13-136 dracut[1667]: *** Creating initramfs image file '/var/lib/kdump/initramfs-5.14.0-570.76.1.el>
Jan 05 10:32:27 ip-10-0-13-136 kdumpctl[1351]: kdump: kexec: loaded kdump kernel
Jan 05 10:32:27 ip-10-0-13-136 kdumpctl[1351]: kdump: Starting kdump: [OK]
Jan 05 10:32:27 ip-10-0-13-136 systemd[1]: Finished Crash recovery kernel arming.
sh-5.1# systemctl is-active kdump.service
active
sh-5.1# systemctl is-enabled kdump.service
enabled
MC Template$ oc create -f - << EOF
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: mc-unit-22
spec:
config:
ignition:
version: 2.2.0
systemd:
units:
- name: my22unit.service
enable: true
EOF
machineconfig.machineconfiguration.openshift.io/mc-unit-22 created
$ oc debug node/ip-10-0-13-136.us-east-2.compute.internal Starting pod/ip-10-0-13-136us-east-2computeinternal-debug-4vrbd ... To use host binaries, run `chroot /host` Pod IP: 10.0.13.136 If you don't see a command prompt, try pressing enter. sh-5.1# chroot /host sh-5.1# systemctl status my22unit.service Unit my22unit.service could not be found. Also tested on below TC passed: (4m36s) 2026-01-05T12:26:21 "[sig-mco] MCO NodeDisruptionPolicy Author:rioliu-NonPreRelease-High-73414-[P1] NodeDisruptionPolicy units with action None [Disruptive] [Serial]" passed: (20m22s) 2026-01-05T12:46:43 "[sig-mco] MCO NodeDisruptionPolicy Author:rioliu-NonPreRelease-Longduration-High-73411-NodeDisruptionPolicy units with multiple actions [Disruptive] [Serial]" passed: (32m32s) 2026-01-05T13:19:15 "[sig-mco] MCO Author:sregidor-Longduration-NonPreRelease-High-47008-Config Drift. Dropin file. [Serial]" passed: (30m36s) 2026-01-05T13:49:51 "[sig-mco] MCO Author:sregidor-Longduration-NonPreRelease-High-47009-Config Drift. New Service Unit. [Serial]" passed: (26m26s) 2026-01-05T14:16:17 "[sig-mco] MCO NodeDisruptionPolicy Author:rioliu-NonPreRelease-Longduration-High-73413-[P2] NodeDisruptionPolicy units with action Reboot [Disruptive] [Serial]" passed: (27m30s) 2026-01-05T14:43:48 "[sig-mco] MCO Author:sregidor-NonPreRelease-Longduration-Medium-56614-[P2][OnCLayer] Create unit with content and mask=true[Disruptive] [Serial]" /label qe-approved |
|
@ptalgulk01: This PR has been marked as verified by DetailsIn response to this:
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. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pablintino, umohnani8 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@pablintino: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Fixed: OCPBUGS-70259
- What I did
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
- Description for the changelog
Ensure OS provided units can be enabled with empty Ignition units.