Ubuntu Pastebin

Paste from csmith at Fri, 27 Oct 2017 21:17:46 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py
index 41367a8..67e32a3 100644
--- a/cloudinit/sources/DataSourceEc2.py
+++ b/cloudinit/sources/DataSourceEc2.py
@@ -480,7 +480,7 @@ def convert_ec2_metadata_network_config(network_md, macs_to_nics=None):
             continue  # Not a physical nic represented in metadata
         nic_cfg = {'type': 'physical', 'name': nic_name, 'subnets': []}
         nic_cfg['mac_address'] = mac
-        if nic_metadata.get('public-ipv4s'):
+        if nic_metadata.get('public-ipv4s') or nic_metadata.get('local-ipv4s'):
             nic_cfg['subnets'].append({'type': 'dhcp4'})
         if nic_metadata.get('ipv6s'):
             nic_cfg['subnets'].append({'type': 'dhcp6'})
Download as text