Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ cloud-init (25.4~1gfcb98b03-0ubuntu1) UNRELEASED; urgency=medium

* d/rules: add meson_versions.py artifact and set DOWNSTREAM_VERSION
during package build.
* d/p/0001-Revert-fix-support-bond-names-in-network_data.patch revert bond name change
* d/p/deprecation-version-boundary.patch: Pin deprecation version to 25.1
* refresh patches:
- d/p/retain-setuptools.patch: retain read-version tool for build.
Drop unsupported doc-requirements.txt and developer packages changes.
* Upstream snapshot based on upstream/main at fcb98b03.

-- Chad Smith <chad.smith@canonical.com> Tue, 16 Dec 2025 14:59:47 -0700
-- Brett Holman <brett.holman@canonical.com> Mon, 15 Dec 2025 19:22:21 +0000

cloud-init (25.3-0ubuntu1~25.04.1) plucky; urgency=medium

* d/p/retain-setuptools.patch: Avoid upstream switch to meson build backend.
* d/p/deprecation-version-boundary.patch: Pin deprecation version to 25.1
* Upstream snapshot based on 25.3. (LP: #2131604).
List of changes from upstream can be found at
https://raw.githubusercontent.com/canonical/cloud-init/25.3/ChangeLog
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
From 4a48e4be98afe754169f6a969a53e448952e0046 Mon Sep 17 00:00:00 2001
From: Brett Holman <brett.holman@canonical.com>
Date: Fri, 21 Nov 2025 21:49:29 +0000
Subject: [PATCH] Revert "fix: support bond names in network_data.json (#6546)"

This reverts commit 7c684160ecada299643573778de91d2a7f1a0024.
Origin: upstream, https://github.com/canonical/cloud-init/pull/6546
---
cloudinit/sources/helpers/openstack.py | 11 +-
.../sources/helpers/test_openstack.py | 121 ------------------
2 files changed, 5 insertions(+), 127 deletions(-)

--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -705,15 +705,11 @@ def convert_net_json(network_json=None,
# is expected by cloudinit.
translated_key = "bond-{}".format(k.split("bond_", 1)[-1])
params.update({translated_key: v})
- cfg["params"] = params

# openstack does not provide a name for the bond.
# they do provide an 'id', but that is possibly non-sensical.
- # so we just create our own name unless 'name' is set.
- if cfg.get("name") is None:
- link_name = bond_name_fmt % bond_number
- cfg["name"] = link_name
- curinfo["name"] = link_name
+ # so we just create our own name.
+ link_name = bond_name_fmt % bond_number
bond_number += 1

# bond_links reference links by their id, but we need to add
@@ -727,6 +723,9 @@ def convert_net_json(network_json=None,
copy.deepcopy(link["bond_links"]),
)
)
+ cfg.update({"params": params, "name": link_name})
+
+ curinfo["name"] = link_name
elif link["type"] in ["vlan"]:
name = "%s.%s" % (link["vlan_link"], link["vlan_id"])
cfg.update(
--- a/tests/unittests/sources/helpers/test_openstack.py
+++ b/tests/unittests/sources/helpers/test_openstack.py
@@ -233,127 +233,6 @@ class TestConvertNetJson:
network_json=network_json, known_macs=macs
)

- def test_bond_name(self):
- """Verify the bond name is retained."""
- network_json = {
- "links": [
- {
- "id": "ens1f0np0",
- "name": "ens1f0np0",
- "type": "phy",
- "ethernet_mac_address": "xx:xx:xx:xx:xx:00",
- "mtu": 9000,
- },
- {
- "id": "ens1f1np1",
- "name": "ens1f1np1",
- "type": "phy",
- "ethernet_mac_address": "xx:xx:xx:xx:xx:01",
- "mtu": 9000,
- },
- {
- "id": "bond0",
- "name": "bond-wan",
- "type": "bond",
- "bond_links": ["ens1f0np0", "ens1f1np1"],
- "mtu": 9000,
- "ethernet_mac_address": "xx:xx:xx:xx:xx:00",
- "bond_mode": "802.3ad",
- "bond_xmit_hash_policy": "layer3+4",
- "bond_miimon": 100,
- },
- {
- "id": "bond0.123",
- # The vlan name is ignored
- "name": "bond0.123",
- "type": "vlan",
- "vlan_link": "bond0",
- "vlan_id": 123,
- "vlan_mac_address": "xx:xx:xx:xx:xx:00",
- },
- ],
- "networks": [
- {
- "id": "publicnet-ipv4",
- "type": "ipv4",
- "link": "bond0.123",
- "ip_address": "x.x.x.x",
- "netmask": "255.255.255.0",
- "routes": [
- {
- "network": "0.0.0.0",
- "netmask": "0.0.0.0",
- "gateway": "x.x.x.1",
- }
- ],
- "network_id": "00000000-0000-0000-0000-000000000000",
- }
- ],
- "services": [{"type": "dns", "address": "1.1.1.1"}],
- }
- expected = {
- "config": [
- {
- "mac_address": "xx:xx:xx:xx:xx:00",
- "mtu": 9000,
- "name": "ens1f0np0",
- "subnets": [],
- "type": "physical",
- },
- {
- "mac_address": "xx:xx:xx:xx:xx:01",
- "mtu": 9000,
- "name": "ens1f1np1",
- "subnets": [],
- "type": "physical",
- },
- {
- "bond_interfaces": ["ens1f0np0", "ens1f1np1"],
- "mtu": 9000,
- "name": "bond-wan",
- "mac_address": "xx:xx:xx:xx:xx:00",
- "params": {
- "bond-miimon": 100,
- "bond-mode": "802.3ad",
- "bond-xmit_hash_policy": "layer3+4",
- },
- "subnets": [],
- "type": "bond",
- },
- {
- "name": "bond-wan.123",
- "subnets": [
- {
- "address": "x.x.x.x",
- "ipv4": True,
- "netmask": "255.255.255.0",
- "routes": [
- {
- "gateway": "x.x.x.1",
- "netmask": "0.0.0.0",
- "network": "0.0.0.0",
- }
- ],
- "type": "static",
- }
- ],
- "type": "vlan",
- "vlan_id": 123,
- "vlan_link": "bond-wan",
- "mac_address": "xx:xx:xx:xx:xx:00",
- },
- {"address": "1.1.1.1", "type": "nameserver"},
- ],
- "version": 1,
- }
- macs = {
- "xx:xx:xx:xx:xx:00": "ens1f0np0",
- "xx:xx:xx:xx:xx:01": "ens1f1np1",
- }
- assert expected == openstack.convert_net_json(
- network_json=network_json, known_macs=macs
- )
-
def test_bond_ipv6_accept_ra_false(self):
"""Verify accept-ra is set to False for static IPv6."""
network_json = {
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
retain-setuptools.patch
deprecation-version-boundary.patch
0001-Revert-fix-support-bond-names-in-network_data.patch