Skip to content

fix(sos): add cloud-init-main and cloud-init-network service names#17025

Open
jonathanbrenes wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
jonathanbrenes:fix/sos-cloud-init-services
Open

fix(sos): add cloud-init-main and cloud-init-network service names#17025
jonathanbrenes wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
jonathanbrenes:fix/sos-cloud-init-services

Conversation

@jonathanbrenes
Copy link
Copy Markdown

Summary

Backport upstream sosreport/sos#4314 as a patch overlay.

cloud-init 24.3 introduced a "single process optimization" (canonical/cloud-init#5489) 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.

Changes

  • Added patch overlay cloud_init-add-cloud-init-main-and-network-services.patch to the sos component
  • The patch adds cloud-init-main and cloud-init-network to the services tuple (backward-compatible — sos skips services that don't exist)

References

Copilot AI review requested due to automatic review settings May 4, 2026 17:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Backports upstream sosreport/sos#4314 via a patch overlay so the cloud_init sos plugin collects service/journal data on distros using cloud-init’s >= 24.3 single-process service names.

Changes:

  • Added a new sos component overlay entry to apply an additional patch.
  • Introduced a patch updating the cloud_init plugin to include cloud-init-main and cloud-init-network service names.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
base/comps/sos/sos.comp.toml Registers a new patch overlay to apply the cloud-init service-name fix.
base/comps/sos/cloud_init-add-cloud-init-main-and-network-services.patch Adds the upstream patch that expands the services tuple to include new cloud-init unit names.

@jonathanbrenes jonathanbrenes force-pushed the fix/sos-cloud-init-services branch 2 times, most recently from 4310595 to 1c84c68 Compare May 4, 2026 18:55
Copy link
Copy Markdown
Contributor

@ddstreetmicrosoft ddstreetmicrosoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than removing the parts that change fluidsynth

# Do not edit manually; changes may be overwritten.


Summary: Real-time software synthesizer
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: please don't update the fluidsynth package here, you can ignore the pr check warning for this particular package.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the fluidsynth references

plugin_name = 'cloud_init'
packages = ('cloud-init',)
- services = ('cloud-init',)
+ services = ('cloud-init', 'cloud-init-main', 'cloud-init-network')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion(non-blocking): you might want to also add cloud-init-local.service (upstream and to azl).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion(non-blocking): you might want to also add cloud-init-local.service (upstream and to azl).

cloud-init-local.service has been added as well. I will push the same PR for the mainstream sos project

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went back to the cloud-init project and I found there are more services. I included them all. This is the PR on the public repository sosreport/sos#4318

@jonathanbrenes jonathanbrenes force-pushed the fix/sos-cloud-init-services branch from 1c84c68 to 545a681 Compare May 4, 2026 20:10
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

🔒❌ Lock files are out of date

FIX: — run this and commit the result:

azldev component update -p fluidsynth -p opencryptoki -p python-s3transfer -p sos -p subunit

Or download the fix patch and apply it:

gh run download 25392460659 -R microsoft/azurelinux -n locks-patch
git apply locks.patch

Changed components (5)

Component New upstream commit
fluidsynth 0b14836d1facea0a25f6421e8da2a1a295b4e7d6
opencryptoki 31e5908208f5ea88fc649e244a861f070d57b813
python-s3transfer 194347324c6f8ac11a8fff4688e5902ae6513fdc
sos f3ecbda85d52c61c5c80ee3fe5c2a31886f040c6
subunit 44e212b372ab8d60a9457e04d6adf9ee8786aa25

@jonathanbrenes jonathanbrenes force-pushed the fix/sos-cloud-init-services branch from 545a681 to cde5e78 Compare May 4, 2026 20:52
plugin_name = 'cloud_init'
packages = ('cloud-init',)
- services = ('cloud-init',)
+ services = ('cloud-init', 'cloud-config', 'cloud-final',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like you just hand-edited the upstream patch included here.

please keep this PR to only the commit that has been merged upstream, and open a new PR for the additional upstream commit (so it can wait for the upstream PR getting merged)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted the changed and I created a new PR on the upstream to add the other units sosreport/sos#4318 I will commit another PR once the upstream is approved

Backport upstream sosreport/sos#4314 as a patch overlay.

cloud-init >= 24.3 renamed cloud-init.service to
cloud-init-network.service and added cloud-init-main.service.
The sos cloud_init plugin needs all three service names to
collect status and journal logs on affected distros.
@jonathanbrenes jonathanbrenes force-pushed the fix/sos-cloud-init-services branch from cde5e78 to 25eb878 Compare May 5, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants