View Issue Details

IDProjectCategoryView StatusLast Update
0000500AlmaLinux-8cloud-initpublic2026-07-07 13:08
Reportermarcoangaroni-italtel Assigned Toalukoshko  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformalmalinuxOSalmalinuxOS Version8
Summary0000500: disable of cloud-init services not working in Almalinux 8
DescriptionThe disable of `cloud-init` services (Almalinux `8`) does not work as documented in https://cloudinit.readthedocs.io/en/23.4/howto/disable_cloud_init.html.
The cloud-init `.service` files are missing the condition keywords to disable the start of the services:
```
ConditionPathExists=!/etc/cloud/cloud-init.disabled
ConditionKernelCommandLine=!cloud-init=disabled
```
This does not happen with original RHEL rpm, which has such conditions.
I think this is due to this patch `ci-Revert-systemd-Standardize-cloud-init-systemd-enable.patch`, which introduced an `if variant` on the template files, like:
```
diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl
index bf91164a..26d2e39c 100644
--- a/systemd/cloud-init.service.tmpl
+++ b/systemd/cloud-init.service.tmpl
@@ -38,9 +38,10 @@ Conflicts=shutdown.target
 Before=shutdown.target
 Conflicts=shutdown.target
 {% endif %}
+{% if variant == "rhel" %}
 ConditionPathExists=!/etc/cloud/cloud-init.disabled
 ConditionKernelCommandLine=!cloud-init=disabled
-ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
+{% endif %}
```
where all the conditions are applied only for the variant `rhel`.
The purpose of the patch seems instead to remove only the `ConditionEnvironment` condition, but the others should remain, otherwise there is no way to disable cloud-init as per relevant docs.
Steps To Reproduce- install cloud-init rpm
- touch /etc/cloud/cloud-init.disabled
- reboot
- the cloud-init services start anyway
TagsNo tags attached.
abrt_hash
URL

Activities

alukoshko

2026-07-07 13:08

administrator   ~0001228

Fixed — resolved as of cloud-init-23.4-7.el8_10.8.alma.2 (March 2025, commit 39323377e).

The AlmaLinux debranding patch was updated so the systemd disable conditions are
no longer gated behind `variant == "rhel"`. The following directives are now
present in both cloud-init.service and cloud-init-local.service:

    ConditionPathExists=!/etc/cloud/cloud-init.disabled
    ConditionKernelCommandLine=!cloud-init=disabled

Both documented disable mechanisms — the /etc/cloud/cloud-init.disabled marker
file and the cloud-init=disabled kernel command-line argument — now work as
expected.

Verified against the current package on all supported releases:
  - AlmaLinux 8 — cloud-init-23.4-7.el8_10.11.alma.2 [OK]
  - AlmaLinux 9 — cloud-init-24.4-8.el9_8.1.alma.1 [OK]
  - AlmaLinux 10 — cloud-init-24.4-7.el10_2.1 [OK]

Users on AlmaLinux 8 should update to at least 23.4-7.el8_10.8.alma.2.
Closing as resolved/fixed.

Issue History

Date Modified Username Field Change
2025-03-13 13:12 marcoangaroni-italtel New Issue
2025-03-13 13:16 elkhan Assigned To => alukoshko
2025-03-13 13:16 elkhan Status new => assigned
2026-07-07 13:08 alukoshko Status assigned => closed
2026-07-07 13:08 alukoshko Resolution open => fixed
2026-07-07 13:08 alukoshko Note Added: 0001228