-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ubuntu/focal to 24.1 #5014
Conversation
On Ubuntu Noble, removal of gpg deb results in some postfix console config prompts which block cloud-init status --wait. Use DEBIAN_FRONTEND=noninteractive when trying to remove deb packages in user-data bootcmd to avoid getting blocked on user input. Refactor this test to perform the apt-get remote gpg later in runcmd because some of the postfix changes also require restart of services due to needrestart interaction. Restarting some of these services block in very early boot, so bootcmd is not an option here. Instead, perform a two-stage launch: 1. launch custom image with runcmd to remove gpg deb 2. snapshot image without gpg and launch with apt user-data to assert gpg gets installed
rather than the instance client object
Not resizing the rootfs should not cause warnings in containers. This is expected, and how cloud-init currently behaves. Similarly, if the image doesn't include the tools to resize the rootfs in a container, cloud-init should similarly not raise warnings. Other changes: - relocate single-use helper function from cc_resize to util.py - add warning on non-containers when no device is found. LP: #2055219
Minimal images have errors/warnings in the log due to the absence of sgdisk, causing an unrelated test failure in the Azure eject test.
Place `set-name` and `wakeonlan` out of `match`, see [0]. Move the elements under the previous part one level up. References: [0] https://netplan.readthedocs.io/en/latest/netplan-yaml/#properties-for-physical-device-types
If there are no NICs available when attempting to perform DHCP, dhcp_discovery() will pass along interface=None. Here is an example failing backtrace: ``` File "/usr/lib/python3/dist-packages/cloudinit/net/ephemeral.py", line 288, in obtain_lease self.lease = maybe_perform_dhcp_discovery( File "/usr/lib/python3/dist-packages/cloudinit/net/dhcp.py", line 98, in maybe_perform_dhcp_discovery return distro.dhcp_client.dhcp_discovery(interface, dhcp_log_func, distro) File "/usr/lib/python3/dist-packages/cloudinit/net/dhcp.py", line 324, in dhcp_discovery distro.net_ops.link_up(interface) File "/usr/lib/python3/dist-packages/cloudinit/net/netops/iproute2.py", line 10, in link_up subp.subp( File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 244, in subp bytes_args = [ File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 245, in <listcomp> x if isinstance(x, bytes) else x.encode("utf-8") for x in args AttributeError: 'NoneType' object has no attribute 'encode' ``` Restore the previous guard which raised NoDHCPLeaseInterfaceError and add a unit test for coverage. Note that the original checks included `if nic not in get_devicelist()` which is not restored in this PR. Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
In upgrade tests, we should only validate clean log on the latest boot to avoid false positives for warnings/errors which were removed by upgrade.
gnupg version 2.4.4 spawns keyboxd daemon automatically when interacting with gpg on the commandline. Cleanup this spawned daemon after cloud-init is done setting up any APT configuration to avoid leaving resident 'unused' processes on the system.
Bump the version in cloudinit/version.py to 24.1 and update ChangeLog.
patches: debian/patches/revert-551f560d-cloud-config-after-snap-seeding.patch
debian/changelog
Outdated
@@ -1,4 +1,4 @@ | |||
cloud-init (23.4.1-0ubuntu1~20.04.3) UNRELEASED; urgency=medium | |||
cloud-init (24.1.1-0ubuntu1~20.04.1) focal; urgency=medium |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As with #5001
cloud-init (24.1.1-0ubuntu1~20.04.1) focal; urgency=medium | |
cloud-init (24.1-0ubuntu1~20.04.1) focal; urgency=medium |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also fixed the version string in the commit message
debian/changelog
Outdated
@@ -19,11 +19,37 @@ cloud-init (23.4.1-0ubuntu1~20.04.3) UNRELEASED; urgency=medium | |||
- d/p/retain-netplan-world-readable.patch | |||
- d/p/status-do-not-remove-duplicated-data.patch | |||
- d/p/status-retain-recoverable-error-exit-code.patch | |||
- d/p/keep-dhclient-as-priority-client.patch | |||
- d/p/revert-551f560d-cloud-config-after-snap-seeding.patch | |||
* Upstream snapshot based on upstream/main at d8b6ac2b. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also prune duplicate Upstream snapshot comments from d/changelog on this yet to be released entry
Additional Context
This syncs ubuntu/focal to 24.1 for the SRU, will create a release branch for focal after this lands.
Test Steps
Merge type