Ryan Harper has proposed merging ~raharper/cloud-init:ubuntu/devel/newupstream-20180914.2 into cloud-init:ubuntu/devel.
Commit message: cloud-init (18.3-46-gbb60f61b-0ubuntu1) cosmic; urgency=medium * New upstream snapshot. - ds-identify: doc string cleanup. - OpenStack: Support setting mac address on bond. [Fabian Wiesel] -- Ryan Harper <ryan.har...@canonical.com> Fri, 14 Sep 2018 16:13:19 -0500 Requested reviews: cloud-init commiters (cloud-init-dev) Related bugs: Bug #1682064 in cloud-init: "cloud-init should support config bond mac address " https://bugs.launchpad.net/cloud-init/+bug/1682064 For more details, see: https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/354973 -- Your team cloud-init commiters is requested to review the proposed merge of ~raharper/cloud-init:ubuntu/devel/newupstream-20180914.2 into cloud-init:ubuntu/devel.
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py index d6f39a1..76a6e31 100644 --- a/cloudinit/sources/helpers/openstack.py +++ b/cloudinit/sources/helpers/openstack.py @@ -604,6 +604,8 @@ def convert_net_json(network_json=None, known_macs=None): cfg.update({'type': 'physical', 'mac_address': link_mac_addr}) elif link['type'] in ['bond']: params = {} + if link_mac_addr: + params['mac_address'] = link_mac_addr for k, v in link.items(): if k == 'bond_links': continue diff --git a/debian/changelog b/debian/changelog index 4ad8877..86f8a53 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +cloud-init (18.3-46-gbb60f61b-0ubuntu1) cosmic; urgency=medium + + * New upstream snapshot. + - ds-identify: doc string cleanup. + - OpenStack: Support setting mac address on bond. [Fabian Wiesel] + + -- Ryan Harper <ryan.har...@canonical.com> Fri, 14 Sep 2018 16:13:19 -0500 + cloud-init (18.3-44-g84bf2482-0ubuntu1) cosmic; urgency=medium * New upstream snapshot. diff --git a/tests/unittests/test_datasource/test_configdrive.py b/tests/unittests/test_datasource/test_configdrive.py index b0abfc5..231619c 100644 --- a/tests/unittests/test_datasource/test_configdrive.py +++ b/tests/unittests/test_datasource/test_configdrive.py @@ -136,6 +136,7 @@ NETWORK_DATA_3 = { ] } +BOND_MAC = "fa:16:3e:b3:72:36" NETWORK_DATA_BOND = { "services": [ {"type": "dns", "address": "1.1.1.191"}, @@ -163,7 +164,7 @@ NETWORK_DATA_BOND = { {"bond_links": ["eth0", "eth1"], "bond_miimon": 100, "bond_mode": "4", "bond_xmit_hash_policy": "layer3+4", - "ethernet_mac_address": "0c:c4:7a:34:6e:3c", + "ethernet_mac_address": BOND_MAC, "id": "bond0", "type": "bond"}, {"ethernet_mac_address": "fa:16:3e:b3:72:30", "id": "vlan2", "type": "vlan", "vlan_id": 602, @@ -691,6 +692,9 @@ class TestConvertNetworkData(CiTestCase): self.assertIn("auto oeth0", eni_rendering) self.assertIn("auto oeth1", eni_rendering) self.assertIn("auto bond0", eni_rendering) + # The bond should have the given mac address + pos = eni_rendering.find("auto bond0") + self.assertIn(BOND_MAC, eni_rendering[pos:]) def test_vlan(self): # light testing of vlan config conversion and eni rendering diff --git a/tools/ds-identify b/tools/ds-identify index fcc6014..5afe5aa 100755 --- a/tools/ds-identify +++ b/tools/ds-identify @@ -2,16 +2,24 @@ # shellcheck disable=2015,2039,2162,2166 # # ds-identify is configured via /etc/cloud/ds-identify.cfg -# or on the kernel command line. It takes primarily 2 inputs: +# or on the kernel command line. It takes the following inputs: +# # datasource: can specify the datasource that should be used. -# kernel command line option: ci.datasource=<dsname> +# kernel command line option: ci.datasource=<dsname> or ci.ds=<dsname> +# example line in /etc/cloud/ds-identify.cfg: +# datasource: Ec2 # # policy: a string that indicates how ds-identify should operate. -# kernel command line option: ci.di.policy=<policy> +# # The format is: # <mode>,found=value,maybe=value,notfound=value # default setting is: -# search,found=all,maybe=all,notfound=disable +# search,found=all,maybe=all,notfound=disabled +# +# kernel command line option: ci.di.policy=<policy> +# example line in /etc/cloud/ds-identify.cfg: +# policy: search,found=all,maybe=none,notfound=disabled +# # # Mode: # disabled: disable cloud-init
_______________________________________________ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp