View Issue Details

IDProjectCategoryView StatusLast Update
0000500AlmaLinux-8cloud-initpublic2025-03-13 13:16
Reportermarcoangaroni-italtel Assigned Toalukoshko  
PriorityhighSeveritymajorReproducibilityalways
Status assignedResolutionopen 
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

There are no notes attached to this issue.

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