Skip to content

Jammy upstream snapshot and new patch#6719

Merged
holmanb merged 65 commits intocanonical:ubuntu/jammyfrom
holmanb:ubuntu/jammy
Feb 5, 2026
Merged

Jammy upstream snapshot and new patch#6719
holmanb merged 65 commits intocanonical:ubuntu/jammyfrom
holmanb:ubuntu/jammy

Conversation

@holmanb
Copy link
Member

@holmanb holmanb commented Feb 5, 2026

Additional Context

Mitigate risk of removing the instance-data URL #6707

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>)

MoeSalah1999 and others added 30 commits December 19, 2025 08:35
-made sure test case classes don't inherit from TestCase
-used pytest fixtures instead of unittest setUp method
-converted all self.assert to plain assert.

Related canonicalGH-6427
disable-sshd-keygen-if-cloud-init-active.conf seems to have been added twice.
Fix it.

Also replace '/usr/lib/systemd/system' by the macro %{_unitdir} to make the
spec file more portable across distros.

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Add test_ds_identify functionality to provide environment variables to
tests using PATH_DI_ENV.
)

When ephemeral networking is brought up in Azure, the selected interface
(`iface`) is `None` under certain conditions. This change introduces 
a helper function `find_primary_nic()` which uses 
`net.find_candidate_nics()` to determine and select the system's primary 
network interface if one is not explicitly set.

Additional improvements:
- Log the MAC address and driver of the selected NIC for easier debugging.
- Ensure the DHCP retry loop updates `iface` to the current primary NIC before
  retrying to obtain a lease.

Fixes canonical#6558
The "has_gnu_date" function checks "date --help" output, but some
versions of "date" don't include a "--help" flag.
`time.strftime()` has platform-specific behavior when dealing with
a `gmtime()` struct.
It was removed in canonical#6356, but is still needed in some tests that
interact with `/tmp`.
Many socket attributes are OS-specific, so ensure we
have attributes that work for the tests that need them.
Also, mock socket calls where needed.
'echo -n' isn't universal
Note that this test wasn't always Linux-specific, but when the pid
stuff moved under Distro, the test was changed to test the base
class (i.e., Linux) functionality only.
Implementation differences cause different results.
In DataSourceCloudStack.py, get_newest_lease() is currently being
passed a Distro object, causing a Python type error. This PR
changes the Distro object to the interface string to fix this error.
Add VM ID to the KVP (Key-Value Pair) event key format to improve
telemetry tracking and debugging capabilities for Azure/Hyper-V
deployments.
The EC2 datasource checks all NICs one by one to see which can reach the
metadata server. This can lead to slow boot if the primary NIC is not
checked first. We use the fact that typically the primary NIC on an EC2
instance will be the lowest numbered Elastic interface (either ENA or
EFA) and order these first. Only then checking other network devices
that may be present.

Fixes canonicalGH-6618

Signed-off-by: Zachary Raines <zachary.raines@canonical.com>
CodeBleu and others added 20 commits January 20, 2026 11:52
…anonical#6554)

* Adding case-insensitive options for systemd-networkd leases ("DOMAINNAME", "Domain", "domain-name").
* Falling back gracefully from systemd leases to ISC dhclient leases.
* Including dhcpcd ephemeral leases as an additional fallback.
* Returning an empty string when no domain name found instead of None for non-fatal missing cases.
)

Prevent traceback raised when cloud-init clean --logs encounters
character-device paths in log configuration.
When no user is provided in the datasource and root login is not
disabled, the root user is configured.  Preserve the provided SSH
key options from user-data for root user in this case.

Before this fix, SSH key options passed in the key line were silently
ignored.
This is what happens:
* `apply_credentials` passes `options=""` to `setup_user_keys`:
  https://github.com/canonical/cloud-init/blob/25.3/cloudinit/config/cc_ssh.py#L257
* `setup_user_keys` receives the empty parameter and passes it to the
  `parse` function:
  https://github.com/canonical/cloud-init/blob/25.3/cloudinit/ssh_util.py#L463
* The `parse` function decides whether options from the key line need to
  be overridden by the `options` parameter. Treat any falsy `options`
  parameter should be treated like `None`, otherwise options from the key
  line are ignored.

Fixes: canonicalGH-3868
Init()'s initialization code is self-referential and has runtime
ordering that prevents static analysis.

Create a property Init.ds which only returns an initialized DataSource.

This narrows the possible code paths that mypy must check and makes
static (and human) analysis possible.
…nonical#6684)

Change the installed ntp client package from ntp to ntpsec when
user-data requests `ntp_client: ntp`.

Fix inability to install ntp deb packages from universe in Ubuntu for
some time which resulted in errors from `cloud-init status` and
failed integration tests.

Most distributions have migrated away from ntp to ntpsec as replacement
implementation which has better security and maintenance as a project.

Package migration has happened in many distributions already:
- Ubuntu was in Xenial 2016
- OpenSUSE available since 2019
- Fedora 34 2021
- Debian Bookworm 2023
- Alpine 3.10 2019
Also eliminate recommendation to modify datasource_list.
The primary motivation for this extra detail is to capture the
flow when multiple DISCOVER requests are required, similar to
what we see in dhclient today so we can better understand how
time is spent in dhcpcd.

Without debug:

```
2026-01-28 18:19:59,156 - azure.py[DEBUG]: dhcp client stderr for interface=eth0: dhcpcd-10.0.6 starting
DUID 00:01:00:01:31:0d:0f:cd:60:45:bd:86:6f:e1
eth0: IAID bd:86:6f:e1
eth0: soliciting a DHCP lease
eth0: offered 10.0.0.4 from 168.63.129.16 LVL101082702015SOC
eth0: leased 10.0.0.4 for infinity
eth0: adding route to 10.0.0.0/16
eth0: adding default route via 10.0.0.1
eth0: adding host route to 168.63.129.16 via 10.0.0.1
eth0: adding host route to 169.254.169.254 via 10.0.0.1
```

With debug:

```
2026-01-28 19:52:56,822 - performance.py[DEBUG]: Running ['dhcpcd', '--ipv4only', '--waitip', '--persistent', '--noarp', '--debug', '--script=/bin/true', 'eth0'] took 0.128 seconds
2026-01-28 19:52:56,822 - azure.py[DEBUG]: dhcp client stdout for interface=eth0:
2026-01-28 19:52:56,822 - azure.py[DEBUG]: dhcp client stderr for interface=eth0: dhcpcd-10.0.6 starting
spawned manager process on PID 527
chrooting as dhcpcd to /usr/lib/dhcpcd
sandbox: seccomp
spawned privileged proxy on PID 528
spawned controller proxy on PID 529
eth0: executing: /bin/true PREINIT
eth0: executing: /bin/true CARRIER
DUID 00:01:00:01:31:0d:25:98:60:45:bd:86:6f:e1
eth0: IAID bd:86:6f:e1
eth0: delaying IPv4 for 0.0 seconds
eth0: reading lease: /var/lib/dhcpcd/eth0.lease
eth0: soliciting a DHCP lease
eth0: spawned BPF BOOTP on PID 535
eth0: sending DISCOVER (xid 0x3793814b), next in 4.6 seconds
eth0: offered 10.0.0.4 from 168.63.129.16 LVL101082702015SOC
eth0: process BPF BOOTP already started on pid 535
eth0: sending REQUEST (xid 0x3793814b), next in 4.4 seconds
eth0: acknowledged 10.0.0.4 from 168.63.129.16 LVL101082702015SOC
eth0: leased 10.0.0.4 for infinity
eth0: writing lease: /var/lib/dhcpcd/eth0.lease
eth0: adding IP address 10.0.0.4/16 broadcast 10.0.255.255
eth0: using Classless Static Routes
eth0: adding route to 10.0.0.0/16
eth0: adding default route via 10.0.0.1
eth0: adding host route to 168.63.129.16 via 10.0.0.1
eth0: adding host route to 169.254.169.254 via 10.0.0.1
eth0: executing: /bin/true BOUND
forked to background
```

One interesting detail I noticed is that a persistent lease file
may be used for reboots and DISCOVER is skipped:

```
2026-01-28 19:49:57,987 - performance.py[DEBUG]: Running ['dhcpcd', '--ipv4only', '--waitip', '--persistent', '--noarp', '--debug', '--script=/bin/true', 'eth0'] took 0.386 seconds
2026-01-28 19:49:57,987 - azure.py[DEBUG]: dhcp client stdout for interface=eth0:
2026-01-28 19:49:57,987 - azure.py[DEBUG]: dhcp client stderr for interface=eth0: dhcpcd-10.0.6 starting
chrooting as dhcpcd to /usr/lib/dhcpcd
sandbox: seccomp
spawned manager process on PID 527
spawned privileged proxy on PID 528
spawned controller proxy on PID 529
DUID 00:01:00:01:31:0d:0f:cd:60:45:bd:86:6f:e1
eth0: executing: /bin/true PREINIT
eth0: executing: /bin/true CARRIER
eth0: IAID bd:86:6f:e1
eth0: delaying IPv4 for 0.4 seconds
eth0: reading lease: /var/lib/dhcpcd/eth0.lease
eth0: rebinding lease of 10.0.0.4
eth0: spawned BPF ARP 10.0.0.4 on PID 545
eth0: sending REQUEST (xid 0x3740297a), next in 4.5 seconds
eth0: spawned BPF BOOTP on PID 546
eth0: acknowledged 10.0.0.4 from 168.63.129.16 LVL101082702015SOC
eth0: leased 10.0.0.4 for infinity
eth0: writing lease: /var/lib/dhcpcd/eth0.lease
eth0: adding IP address 10.0.0.4/16 broadcast 10.0.255.255
eth0: using Classless Static Routes
eth0: adding route to 10.0.0.0/16
eth0: adding default route via 10.0.0.1
eth0: adding host route to 168.63.129.16 via 10.0.0.1
eth0: adding host route to 169.254.169.254 via 10.0.0.1
eth0: executing: /bin/true REBOOT
forked to background
```

The --debug option has been around forever for dhcpcd so it should
be safe.  We can see it the oldest tagged version in git and
Ubuntu 14.04's manpage:
https://manpages.ubuntu.com/manpages//trusty/man8/dhcpcd-bin.8.html

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
Add _integration_common.yml which allows parameterized launches of
lxc_container based integration tests.

Provide separate daily scheduled integration test runners for jammy,
noble, questing and resolute which can also by manually started.
cloud-init project now requires full SHA commits instead of tags for
all workflows to utilize a more secure policy for CI runners.

Any Github actions lacking full SHA pins in workflows/actions will
error due to repo prevention policy.

Additionally update SHA pins to latest known workflow releases.
…cal#6707)

Fixes DNS queries for IP addresses that cause 2+ minute boot delays
with systemd 259+. Moves IP detection earlier in is_resolvable() and
removes legacy DNS-dependent metadata URL.

Fixes canonicalGH-6641
patches:
debian/patches/no-single-process.patch
debian/patches/retain-ec2-default-net-update-events.patch
debian/patches/revert-551f560d-cloud-config-after-snap-seeding.patch
debian/patches/status-do-not-remove-duplicated-data.patch
debian/patches/status-retain-recoverable-error-exit-code.patch
@github-actions github-actions bot added the packaging Supplemental package review requested label Feb 5, 2026
Comment on lines +1 to +8
From f6a682b50958f7081422d02056db64798bdf97ed Mon Sep 17 00:00:00 2001
From: Brett Holman <brett.holman@canonical.com>
Date: Thu, 5 Feb 2026 16:17:35 +0000
Subject: [PATCH] Revert "fix: DNS resolution performance regression during
local stage (#6707)"

This reverts commit 72809f8046f7abb5157e864a903cc5cc3c70ecbb.
---
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is being used to generate this header? It doesn't appear to be DEP 3 compliant. My expectation with quilt patches is seeing keys like the following:
Description: Author: Last-Update: etc. per Ubuntu packaging guide

Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

Patch diff looks good, but I think we may need to confirm to DEP 3 quilt patch header format for these packaging branches.

@holmanb
Copy link
Member Author

holmanb commented Feb 5, 2026

What is being used to generate this header?

git format-patch

It doesn't appear to be DEP 3 compliant. My expectation with quilt patches is seeing keys like the following:
Description: Author: Last-Update: etc. per Ubuntu packaging guide

Why not? DEP-3 actually allows using git patches.

Compatibility with git patches

The files produced by git format-patch are in the mailbox format, with RFC-2822 formatted fields From, Date and Subject, followed by the git commit message body, and headers terminating in ---. Such patch files can be used as-is, but in most cases appending a Bug: after the git commit message will greatly help tracking the state of the patch.

A single patch can be created with e.g. git format-patch -1 d33286c from a single commit. Avoid using git show as it lacks the full headers.

In most cases it is advisable to use DEP-3 compliant helper tools such as git-buildpackage's patch queue feature (gbp pq). They will typically let you import the debian/patches contents into a dedicated branch that can be manipulated with the usual git commands, and then export it back to patch files in the correct format.

Unfortunately, gbp doesn't seem capable of generating a DEP-3 patch from a git commit, so Debian's recommended tooling is insufficient for the task. To create a patch from a git commit, this is what I do:

git revert $COMMIT
git format-patch -1
git reset --hard HEAD^
quilt push -a
quilt refresh          # quilt prefers a slightly different format
quilt pop -a --refresh # but this sequence reliably re-formats it.

Manually editing patches doesn't seem like a great use of time when a programmatic solution exists using standard tooling. I'd prefer to call this "good enough" and spend our time elsewhere. The Debian docs (linked from the page you referenced) seems to think it is, and the Ubuntu docs doesn't take a stronger stance than "We recommend that you tag every patch with DEP-3 headers by putting them at the top of patch file." - and as I quoted above, this suffices.

@holmanb holmanb requested a review from blackboxsw February 5, 2026 22:16
@blackboxsw
Copy link
Collaborator

What is being used to generate this header?

git format-patch

It doesn't appear to be DEP 3 compliant. My expectation with quilt patches is seeing keys like the following:
Description: Author: Last-Update: etc. per Ubuntu packaging guide

Why not? DEP-3 actually allows using git patches.

My mistake, I hadn't been aware of this tooling and had always formerly used quilt header --dep3 -e for all our cloud-init patch header generation. I saw the leading double From: and the lack of and thought something was amiss.

I also had overlooked the inclusive conditional or in Description or Subject (required).

Unfortunately, gbp doesn't seem capable of generating a DEP-3 patch from a git commit, so Debian's recommended tooling is insufficient for the task. To create a patch from a git commit, this is what I do:

git revert $COMMIT
git format-patch -1
git reset --hard HEAD^
quilt push -a
quilt refresh          # quilt prefers a slightly different format
quilt pop -a --refresh # but this sequence reliably re-formats it.

Ok, so instead of manually writing a Description via quilt header --dep3 -e we can rely on git format-patch generating that simple revert and email format for full reverts of upstream commits. But, in the event that we backport our own patches with minimal changes I see us still wanting to perform the steps we document in the uss-tableflip/ubuntu-release-process

This PR represents the first divergence from that quilt generated --dep3 header. I'm good with this representation now that I know the source of this header generation is from tooling and not likely something we can be affected by humans and typographical errors. Thanks for the discussion.

@blackboxsw
Copy link
Collaborator

What is being used to generate this header?

git format-patch

It doesn't appear to be DEP 3 compliant. My expectation with quilt patches is seeing keys like the following:
Description: Author: Last-Update: etc. per Ubuntu packaging guide

Why not? DEP-3 actually allows using git patches.

My mistake, I hadn't been aware of this tooling and had always formerly used quilt header --dep3 -e for all our cloud-init patch header generation. I saw the leading double From: and the lack of and thought something was amiss.

I also had overlooked the inclusive conditional or in Description or Subject (required).

Unfortunately, gbp doesn't seem capable of generating a DEP-3 patch from a git commit, so Debian's recommended tooling is insufficient for the task. To create a patch from a git commit, this is what I do:

git revert $COMMIT
git format-patch -1
git reset --hard HEAD^
quilt push -a
quilt refresh          # quilt prefers a slightly different format
quilt pop -a --refresh # but this sequence reliably re-formats it.

Ok, so instead of manually writing a Description via quilt header --dep3 -e we can rely on git format-patch generating that simple revert and email format for full reverts of upstream commits. But, in the event that we backport our own patches with minimal changes I see us still wanting to perform the steps we document in the uss-tableflip/ubuntu-release-process

This PR represents the first divergence from that quilt generated --dep3 header. I'm good with this representation now that I know the source of this header generation is from tooling and not likely something we can be affected by humans and typographical errors. Thanks for the discussion.

Oops also missed the other patch we've already pushed with this header style: 7b0b2be

Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

Ok, side-conversation:

Do we want to encode ordering of patch series into the names of our patch files?:
--- No, not worth the maintenance burden. It's best for us to just use tools that meet our immediate needs (either quilt header --dep3 -e for backports or git format-patch for clean reverts. Our guidance of ordering is easily determined via quilt push -a or just looking at the series file.

So, we don't care that default behavior of git format-patch adds a prefix 0001- based on the patch generated.

@holmanb
Copy link
Member Author

holmanb commented Feb 5, 2026

Thanks for the discussion on this @blackboxsw.

@holmanb holmanb merged commit a061d1e into canonical:ubuntu/jammy Feb 5, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packaging Supplemental package review requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.