diff --git a/base/comps/sos/cloud_init-add-cloud-init-main-and-network-services.patch b/base/comps/sos/cloud_init-add-cloud-init-main-and-network-services.patch new file mode 100644 index 00000000000..a042da1d3df --- /dev/null +++ b/base/comps/sos/cloud_init-add-cloud-init-main-and-network-services.patch @@ -0,0 +1,43 @@ +From 91154c0c3b2a2aa9076ee34cea62dd4cc8f1ad04 Mon Sep 17 00:00:00 2001 +From: Jonathan Brenes +Date: Wed, 29 Apr 2026 11:42:05 -0600 +Subject: [PATCH] fix(cloud_init): add cloud-init-main and cloud-init-network + service names + +cloud-init 24.3 introduced a "single process optimization" +(canonical/cloud-init#5489, merged Aug 2, 2024) that renamed +cloud-init.service to cloud-init-network.service and added a new +cloud-init-main.service as the primary single-process service. + +Distros shipping cloud-init >= 24.3 no longer have a +cloud-init.service unit. The sos cloud_init plugin only listed +cloud-init.service, so it failed to collect service status and +journal logs for the new service names on these distros. + +Adding cloud-init-main and cloud-init-network to the services tuple +is backward-compatible: sos will simply skip services that do not +exist on a given system. + +Ref: https://github.com/canonical/cloud-init/pull/5489 +Ref: https://github.com/canonical/cloud-init/commit/143bc9e +Ref: https://discourse.ubuntu.com/t/announcement-cloud-init-perfomance-optimization-single-process/47505 +Signed-off-by: Jonathan Brenes +--- + sos/report/plugins/cloud_init.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/report/plugins/cloud_init.py b/sos/report/plugins/cloud_init.py +index a76e751ad5..cc16163902 100644 +--- a/sos/report/plugins/cloud_init.py ++++ b/sos/report/plugins/cloud_init.py +@@ -17,7 +17,7 @@ class CloudInit(Plugin, IndependentPlugin): + + plugin_name = 'cloud_init' + packages = ('cloud-init',) +- services = ('cloud-init',) ++ services = ('cloud-init', 'cloud-init-main', 'cloud-init-network') + + def setup(self): + +-- +2.49.0 diff --git a/base/comps/sos/sos.comp.toml b/base/comps/sos/sos.comp.toml index d6ece9002f0..190de3b9040 100644 --- a/base/comps/sos/sos.comp.toml +++ b/base/comps/sos/sos.comp.toml @@ -11,3 +11,9 @@ description = "Add os_release_id value to match os-release ID" type = "patch-add" file = "Policy-Add-os_release_id-check.patch" source = "Policy-Add-os_release_id-check.patch" + +[[components.sos.overlays]] +description = "Add cloud-init-main and cloud-init-network service names for cloud-init >= 24.3 single-process optimization (upstream PR sosreport/sos#4314)" +type = "patch-add" +file = "cloud_init-add-cloud-init-main-and-network-services.patch" +source = "cloud_init-add-cloud-init-main-and-network-services.patch" diff --git a/locks/sos.lock b/locks/sos.lock index 2a2ea624c62..1e332c63e80 100644 --- a/locks/sos.lock +++ b/locks/sos.lock @@ -2,5 +2,5 @@ version = 1 import-commit = 'f3ecbda85d52c61c5c80ee3fe5c2a31886f040c6' upstream-commit = 'f3ecbda85d52c61c5c80ee3fe5c2a31886f040c6' -input-fingerprint = 'sha256:833766ffc4e275c5f663b1acd76e75c5913ba1376473705699a3e53f86939227' +input-fingerprint = 'sha256:11e4c1681e46aa62e8259318dadcbf5495db32919fef80bc128ce99cd9f138c3' resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e' diff --git a/specs/s/sos/cloud_init-add-cloud-init-main-and-network-services.patch b/specs/s/sos/cloud_init-add-cloud-init-main-and-network-services.patch new file mode 100644 index 00000000000..a042da1d3df --- /dev/null +++ b/specs/s/sos/cloud_init-add-cloud-init-main-and-network-services.patch @@ -0,0 +1,43 @@ +From 91154c0c3b2a2aa9076ee34cea62dd4cc8f1ad04 Mon Sep 17 00:00:00 2001 +From: Jonathan Brenes +Date: Wed, 29 Apr 2026 11:42:05 -0600 +Subject: [PATCH] fix(cloud_init): add cloud-init-main and cloud-init-network + service names + +cloud-init 24.3 introduced a "single process optimization" +(canonical/cloud-init#5489, merged Aug 2, 2024) that renamed +cloud-init.service to cloud-init-network.service and added a new +cloud-init-main.service as the primary single-process service. + +Distros shipping cloud-init >= 24.3 no longer have a +cloud-init.service unit. The sos cloud_init plugin only listed +cloud-init.service, so it failed to collect service status and +journal logs for the new service names on these distros. + +Adding cloud-init-main and cloud-init-network to the services tuple +is backward-compatible: sos will simply skip services that do not +exist on a given system. + +Ref: https://github.com/canonical/cloud-init/pull/5489 +Ref: https://github.com/canonical/cloud-init/commit/143bc9e +Ref: https://discourse.ubuntu.com/t/announcement-cloud-init-perfomance-optimization-single-process/47505 +Signed-off-by: Jonathan Brenes +--- + sos/report/plugins/cloud_init.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sos/report/plugins/cloud_init.py b/sos/report/plugins/cloud_init.py +index a76e751ad5..cc16163902 100644 +--- a/sos/report/plugins/cloud_init.py ++++ b/sos/report/plugins/cloud_init.py +@@ -17,7 +17,7 @@ class CloudInit(Plugin, IndependentPlugin): + + plugin_name = 'cloud_init' + packages = ('cloud-init',) +- services = ('cloud-init',) ++ services = ('cloud-init', 'cloud-init-main', 'cloud-init-network') + + def setup(self): + +-- +2.49.0 diff --git a/specs/s/sos/sos.spec b/specs/s/sos/sos.spec index 687cdd834ed..a0c9082fa01 100644 --- a/specs/s/sos/sos.spec +++ b/specs/s/sos/sos.spec @@ -2,7 +2,7 @@ ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: - release_number = 2; + release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} @@ -44,6 +44,7 @@ BuildRequires: fdupes Patch0: Policy-Fix-os_release_name-value.patch Patch1: Policy-Add-os_release_id-check.patch +Patch2: cloud_init-add-cloud-init-main-and-network-services.patch %description Sos is a set of tools that gathers information about system hardware and configuration. The information can then be used for @@ -118,6 +119,9 @@ rm -rf %{buildroot}/usr/config/ %changelog ## START: Generated by rpmautospec +* Mon May 04 2026 Jonathan Brenes - 4.11.0-3 +- fix(sos): add cloud-init-main and cloud-init-network service names + * Thu Apr 30 2026 Daniel McIlvaney - 4.11.0-2 - feat: introduce deterministic commit resolution via Azure Linux lock file