Skip to content

fix(cloud-init): update cloud-init to correctly support azl4#16938

Merged
christopherco merged 6 commits into
microsoft:tomls/base/mainfrom
ddstreet:cloud-init-cfg
May 12, 2026
Merged

fix(cloud-init): update cloud-init to correctly support azl4#16938
christopherco merged 6 commits into
microsoft:tomls/base/mainfrom
ddstreet:cloud-init-cfg

Conversation

@ddstreet
Copy link
Copy Markdown
Contributor

@ddstreet ddstreet commented Apr 29, 2026

This modifies the spec file to pass the variant as 'azurelinux', as well as applying patches from upstream PR canonical/cloud-init#6874

Fixes: AB#18738

Copilot AI review requested due to automatic review settings April 29, 2026 14:37
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

Updates the cloud-init component packaging for Azure Linux 4 by ensuring the rendered templates/configs are generated with an azurelinux variant and by patching upstream templates to recognize that variant.

Changes:

  • Add a patch to include azurelinux in cloud-init’s systemd unit/generator templates.
  • Add a patch to adjust cloud.cfg template behavior for azurelinux (including default user handling) and update the related unit test.
  • Update cloud-init.comp.toml overlays to apply the new patches and to replace the spec’s render-template --variant ... invocation with --variant azurelinux.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
base/comps/cloud-init/cloud-init.comp.toml Adds new Patch/file overlays and changes the spec search/replace to force --variant azurelinux.
base/comps/cloud-init/add-azurelinux-to-systemd-templates.patch Extends systemd template conditionals to treat azurelinux like Fedora/RHEL-family variants where appropriate.
base/comps/cloud-init/update-cloud-cfg.patch Adjusts cloud.cfg template logic for azurelinux and updates an upstream unit test expectation.

Comment thread base/comps/cloud-init/cloud-init.comp.toml
Comment thread base/comps/cloud-init/cloud-init.comp.toml
Comment thread base/comps/cloud-init/cloud-init.comp.toml Outdated
@ddstreet ddstreet marked this pull request as draft April 29, 2026 18:52
@ddstreet
Copy link
Copy Markdown
Contributor Author

converting to draft temporarily, so i can get real patches set up in a branch on a forked cloud-init repo.

@ddstreet ddstreet force-pushed the cloud-init-cfg branch 22 times, most recently from c199738 to e7bc499 Compare May 8, 2026 17:46
@ddstreet ddstreet force-pushed the cloud-init-cfg branch 12 times, most recently from 4024b55 to adf08b0 Compare May 8, 2026 21:08
@ddstreetmicrosoft ddstreetmicrosoft marked this pull request as ready for review May 8, 2026 21:16
@ddstreet ddstreet force-pushed the cloud-init-cfg branch 2 times, most recently from 63ae5f2 to 94241ac Compare May 11, 2026 15:32
@ddstreet
Copy link
Copy Markdown
Contributor Author

this is ready for review/merging. note that the upstream pr has not yet been merged, but getting this in is time-sensitive, and we can adjust if needed once the upstream pr is merged.

ddstreet added 4 commits May 11, 2026 17:00
…nux.patch

The description describes the cpe parsing as invalid, but it's
actually just a newer cpe format.
Set the %py3_install --distro parameter to azurelinux instead of
fedora.

Also move the overlay to after the addition of upstream patches.
@ddstreet ddstreet force-pushed the cloud-init-cfg branch 2 times, most recently from 6e86174 to 052f3a7 Compare May 11, 2026 21:08
Update the build to pass the variant 'azurelinux' as well as applying
multiple patches from upstream PR canonical/cloud-init#6874.
@ddstreet
Copy link
Copy Markdown
Contributor Author

updated to keep the --distro parameter to the %py3_install command, but change it over to --distro=azurelinux. That should be autodetected when building on azurelinux 4.0, but it doesn't hurt to explicitly provide it

Comment thread base/comps/cloud-init/cloud-init.comp.toml
@christopherco christopherco merged commit 8ab35a0 into microsoft:tomls/base/main May 12, 2026
6 checks passed
@ddstreet ddstreet deleted the cloud-init-cfg branch May 14, 2026 17:56
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