Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 91154c0c3b2a2aa9076ee34cea62dd4cc8f1ad04 Mon Sep 17 00:00:00 2001
From: Jonathan Brenes <jonathan.brenes@microsoft.com>
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
Comment thread
jonathanbrenes marked this conversation as resolved.
Signed-off-by: Jonathan Brenes <jonathan.brenes@microsoft.com>
---
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
6 changes: 6 additions & 0 deletions base/comps/sos/sos.comp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion locks/sos.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 91154c0c3b2a2aa9076ee34cea62dd4cc8f1ad04 Mon Sep 17 00:00:00 2001
From: Jonathan Brenes <jonathan.brenes@microsoft.com>
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 <jonathan.brenes@microsoft.com>
---
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
6 changes: 5 additions & 1 deletion specs/s/sos/sos.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -118,6 +119,9 @@ rm -rf %{buildroot}/usr/config/

%changelog
## START: Generated by rpmautospec
* Mon May 04 2026 Jonathan Brenes <jonathan.brenes@microsoft.com> - 4.11.0-3
- fix(sos): add cloud-init-main and cloud-init-network service names

* Thu Apr 30 2026 Daniel McIlvaney <damcilva@microsoft.com> - 4.11.0-2
- feat: introduce deterministic commit resolution via Azure Linux lock file

Expand Down
Loading