Skip to content

Ubuntu/devel: new upstream snapshot for release into Ubuntu stonking (devel series). #6903

Open
blackboxsw wants to merge 50 commits into
canonical:ubuntu/develfrom
blackboxsw:ubuntu/devel
Open

Ubuntu/devel: new upstream snapshot for release into Ubuntu stonking (devel series). #6903
blackboxsw wants to merge 50 commits into
canonical:ubuntu/develfrom
blackboxsw:ubuntu/devel

Conversation

@blackboxsw

Copy link
Copy Markdown
Collaborator

Procedure for this branch

git fetch upstream
git checkout upsteam/ubuntu/devel -B ubuntu/devel
new_upstream_snapshot.py
build-package
sbuild --dist=stonking --arch=amd64 --arch-all ../out/cloud-init*dsc
CLOUD_INIT_PLATFORM=lxd_container CLOUD_INIT_CLOUD_INIT_SOURCE=cloud-init-base*deb  CLOUD_INIT_OS_IMAGE=resolute  tox -e integration-tests | tee resolute-upload-test.log

# Note can't test stonking images yet in lxc due to ongoing build resource delays.

Proposed Commit Message

individ commits, no squashmerge for this PR .

Additional Context

Integration test run (1 failure) against resolute with this new cloud-init-base image.
resolute-upload.log

Single integration test failure is resolved by #6902

Test Steps

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)
  • author push direct to upstrem/ubuntu/devel upon approval

blackboxsw and others added 30 commits March 2, 2026 09:18
Avoid maintenance per release of static map.
…nical#6771)

There are some scenarios where we wish to skip cloud-init's health
ready reporting for Azure when it completes init-local phase.

Prefix it with experimental_ so it's clear it's not supported. We
can rename and document it in the future if we want to keep it.
There are also some edge cases that aren't fully supported as-is
as this process skips fetching ssh keys from wireserver in the cases
that require it (e.g. CRLF or x509 certs).

To test, configure this flag in VM/image:
```yaml
datasource:
  Azure:
    experimental_skip_ready_report: true
```

Verify behavior in logs:
```bash
$ grep ready_report /var/log/cloud-init.log
2026-02-27 17:57:53,058 - DataSourceAzure.py[DEBUG]: Skipping final health report as experimental_skip_ready_report is enabled.
```

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
…le (canonical#6772)

Building on the previous optimization in canonical#2040, add an additional 
optimization to fail early when the hostname is not resolvable at all.
As we manipulate paths acquired by subprocessing cmd.exe inside WSL,
by using it in UTF-16 mode we ensure a predictable output when the strings
are not ASCII-compatible, such as reading the user profile when it contains special characters.

Fixes canonicalGH-6716
Adds the ReportableErrorImportError class to catch
a known issue with unhandled exceptions when importing 
crypt and passlib, but both are missing.

Fixes canonicalGH-6770
fix(bsd): correct the _ROOT_TMPDIR path for *BSD system (solves canonical#5789)

Fixes canonicalGH-5789
Set LOCAL_LOG_PATH to ./cloudinit_logs for artifact harvest on failure.
Absence of this log indicates that the klibc code is not used.
Make `tox` -e do_format` and `tox -e check_format` enforce formatting of json and shell scripts.

Remove unmaintained shell scripts.

Update GH Actions.
…anonical#6804)

hashFiles OOMs github actions while attempting to md5sum large sets
files under cloudinit_logs. Use `if-no-files-found: ignore` in
upload-artifact to avoid errors in absence of cloudinit_logs due to
unexpected errors which prevent writing integration test logs.
The biggest change is dropping jinja2 import handling code and testing
handlers. The jinja2 module has been imported directly in templater.py
since 24.1.

The unit test helper has some additional helpers that can be dropped as
well as overridden mock imports.
Fixes leaked rmtree call during package builds for rocky and redhat.
…onical#6809)

RockyLinux 9 has Jinja 2.11. Template-based unit tests break due to
unsupported closure: +%}.

Revert portion of 473fa33 to retain skip decorator avoiding unit test
when Jinja is < 3.0.0 to support rockylinux developer rpm builds.

Update ruff extra-includes to validate read-dependencies, bddeb and brpm.
…cal#6822)

When the schema validation takes more than 0.01 seconds, a log is emitted:
"Validating schema took 0.070 seconds"

When this happens, the tuple length is 2 and not one and the test test_validateconfig_schema_non_strict_emits_warnings fails.

Fix it by checking if the length of the tuple is either one or two,
not just one.

Signed-off-by: Ani Sinha <anisinha@redhat.com>
integraton tests: add RHEL distro support
- add default usename for RHEL distro and platform specific.
- add optional LAUNCH_USERNAME in integration_settings to override
  default username per run.
- use distro-specific USER_DATA in test_combined and
  adjust rsyslog and locale config so they work on RHEL,
  and removing the modules which not support RHEL.
- skip the tests in test_combined which do not surport RHEL.

Signed-off-by: Amy Chen <xiachen@redhat.com>
The current debian apply_locale implementation
depends on a modified locale-gen script that
only exists on ubuntu systems. This patch
fixes the generation of new locales
and should also work on ubuntu
with out the reliance on the custom
locale-gen patch.

Fixes canonicalGH-6471

Signed-off-by: paulober <paul.oberosler@raspberrypi.com>
Running on `rpi-usb-gadget` on a Raspberry Pi Zero 2 W takes more than
15 seconds.

Even running it manually on a settled system is longer than the allowed
timeout:

Fixes: raspberrypi/rpi-imager#1403
…onical#6830)

ssh-import-id has been experiencing high failure rates retrieving
Launchpad-based SSH keys resulting in exit 1 which raises errors
from cloud-init status. Use Github based keys instead as this
backend doesn't appear to cause problems.
Also convert a few fake_filesystem tests to prove its usage:
- tests/unittests/config/test_cc_keyboard.py
- tests/unittests/config/test_cc_mounts.py
- tests/unittests/config/test_cc_update_etc_hosts.py
- tests/unittests/config/test_cc_puppet.py
Remove DataSourceOpenNebula and its unit tests from the mypy
check_untyped_defs=false override list and add type annotations
to satisfy stricter checking.

Annotate parse_shell_config, OpenNebulaNetwork.__init__, get_field
(with @overload to distinguish str vs Optional[str] return),
all get_* methods, get_physical_nics_by_mac, and
read_context_disk_dir (fixing its stale docstring).

Remove test_get_field_nonecontext: shell variables cannot hold None
values so the scenario is impossible; test_get_field_emptycontext
covers the realistic equivalent.

Remove leftover bare `util.find_devs_with` assignment in
test_find_candidates, a refactoring artifact from d482353 that
leaked state between tests.

Refs canonicalGH-6810
…sk (canonical#6728)

When checking GPT partition layout using sfdisk, handle the case
where a disk has no partition table yet. Previously, this would
raise an exception. Now it returns an empty list.

Add unit test to cover this empty disk scenario.

Fixes canonicalGH-6682

Signed-off-by: Amy Chen <xiachen@redhat.com>
Add a single retry on ssh-import-id to mitigate intermittent errors
from remote service avoiding boot failures.

Seeing 10-20% failure rate of exit 1's from ssh-import-id during
instance launches in github action runners.
Adding amazon linux variant to cloud config. 
And Refreshing/Updating module values for Amazon Linux distro only.
Namely cc_ca_cert and cc_yum_add_repo.
mcanevet and others added 17 commits May 1, 2026 14:17
ONE_CONTEXT passes ETHx_MTU as a string, but Netplan's network-config-v2
schema requires mtu to be an integer. Without this, cloud-init schema
validation fails with "'1500' is not of type 'integer'".
…canonical#6810)

Add `get_routes()` to `OpenNebulaNetwork` to parse the `ETHx_ROUTES`
context variable (format: "NETWORK via GATEWAY, ...") and emit the
resulting routes into the Netplan v2 `routes:` list in `gen_conf()`.

Malformed entries are skipped with a warning. No `routes` key is emitted
when the variable is absent or empty, preserving backward compatibility.
Explanations did not match the code (or the opposite).

Fixes canonicalGH-6857
…cal#6897)

logger from bsdutils v2.39 defaults to UDP unless --tcp is
otherwise specified. Since our integration test is only grabbing
imtcp events, udp is ignored on Noble and newer.

Drop deprecated `~` in favor of explicit `stop`
)

DHCP leases can be directly obtained from network manager through appropriate
command to the network manager cli. Add a couple of helper functions to get
the lease information from network manager.

In a subsequent patch, we will use the helper function from cloud stack
datasource to get the lease information from network manager.

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Co-authored-by: Chad Smith <chad.smith@canonical.com>
Without mocking out dhcp.IscDhclient.get_newest_lease_file_from_distro, the
functions on some platforms returns None. This means
get_key_from_latest_lease() bails out early without calling parse_leases()
to parse the lease file. Fix it.

Signed-off-by: Ani Sinha <anisinha@redhat.com>
…ses (canonical#6829)

Red Hat uses network manager as the supported dhcp client. If network manager
cli is available, we should try to get domain name information directly from
the network manager leases before asking distro specific dhcp client
(dhcpcd by default).

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Co-authored-by: Chad Smith <chad.smith@canonical.com>
…nical#6829)

Red Hat distributions uses network manager to manage DHCP leases. This change
adds support for obtaining vr address information from DHCP leases maintained
by network manager.

Co-authored-by: Chad Smith <chad.smith@canonical.com>
Signed-off-by: Ani Sinha <anisinha@redhat.com>
….destroy

Avoid client.destroy within the cloud_session.launch context manager
as it already performs cloud.destroy on context exit which calls
instance.destroy. This avoids the following error seen by pycloudlib
on Azure instances:

  <pycloudlib.azure.instance.AzureInstance object at ....

  @Property
  def id(self):
      """Return instance id."""
      return self._instance["vm"].id
               ^^^^^^^^^^^^^^^^^^^^
      TypeError: 'NoneType' object is not subscriptable

Additionally, some Azure instance launches encounter intemittent
warning reaching IMDS on first attempt. Avoid failing integration
tests when encountering a single warning about IMDS access.

If multiple retries are required to reach Azure IMDS, treat this as
an error.
Azure Linux 4 is now Fedora-based. Therefore:
Simplify the config template.
Remove the custom group config.
Set the default user to "azureuser".
Use fedora mount_default_fields and ssh_pwauth settings.
Use network renderers: netplan, systemd-networkd, and NetworkManager.
Use libexec path for ds-identify.
Remove overridden package_command() method
Undo various distro-specific overrides.
Recent versions of journalctl and rsyslog avoid mirroring
/dev/console messages to /var/log/syslog. Prefer to ask journalctl
directly about _TRANSPORT=syslog type messages to track what cloud-init
writes to console as this approach works in both legacy and current
rsyslog/journald behavior.
@holmanb

holmanb commented Jun 12, 2026

Copy link
Copy Markdown
Member

Is this targeting the correct branch?

@holmanb holmanb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^

@blackboxsw blackboxsw changed the base branch from main to ubuntu/devel June 15, 2026 17:39
@blackboxsw blackboxsw closed this Jun 17, 2026
@blackboxsw

Copy link
Copy Markdown
Collaborator Author

Reopening to fix shell-check CI which was basing diff against original main merge target.

@blackboxsw blackboxsw reopened this Jun 17, 2026
Comment thread debian/patches/series
@@ -1 +0,0 @@
cpick-d4566b1a-fix-ubuntu-Configure-arm64-to-use-archive.ubuntu.com

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This leaves behind the series file - I think this should be deleted.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Dropped d/p/series file and updated d/changelog to represent the dropped cherry picks.

drop the following cherry picks:
cpick-d4566b1a-fix-ubuntu-Configure-arm64-to-use-archive.ubuntu.com
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.