cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #03833
[Merge] ~rmccabe/cloud-init:bug1734739 into cloud-init:master
Ryan McCabe has proposed merging ~rmccabe/cloud-init:bug1734739 into cloud-init:master.
Requested reviews:
cloud-init commiters (cloud-init-dev)
Related bugs:
Bug #1734739 in cloud-init: "cloud-init mishandles dhcp6 subnets in network_data.json"
https://bugs.launchpad.net/cloud-init/+bug/1734739
For more details, see:
https://code.launchpad.net/~rmccabe/cloud-init/+git/cloud-init/+merge/334323
network_data.json: Handle dhcp6 subnets correctly
Fix a typo that caused dhcp6 subnets in network_data.json input
to be treated as dhcp4.
LP: #1734739
--
Your team cloud-init commiters is requested to review the proposed merge of ~rmccabe/cloud-init:bug1734739 into cloud-init:master.
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
index 26f3168..5bb476f 100644
--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -570,7 +570,7 @@ def convert_net_json(network_json=None, known_macs=None):
subnet = dict((k, v) for k, v in network.items()
if k in valid_keys['subnet'])
if 'dhcp' in network['type']:
- t = 'dhcp6' if network['type'].startswith('ipv6') else 'dhcp4'
+ t = 'dhcp6' if network['type'].endswith('6') else 'dhcp4'
subnet.update({
'type': t,
})
Follow ups