cloud-init throws an exception when processing the "iface lo inet loopback" entry in the config drive (will attach):
ValueError: Unknown subnet type 'loopback' found for interface 'lo'
Version-Release number of selected component (if applicable):
cloud-init-0.7.9-9.el7.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Boot rhel-server-7.4-x86_64-kvm.qcow2 (we're currently running OpenStack Liberty)
2. Observe network is inaccessible
3. Use spice-console to log in and observe traceback in /var/log/cloud.log (will attach)
Description of problem:
cloud-init throws an exception when processing the "iface lo inet loopback" entry in the config drive (will attach):
ValueError: Unknown subnet type 'loopback' found for interface 'lo'
Version-Release number of selected component (if applicable):
cloud-init- 0.7.9-9. el7.x86_ 64
How reproducible:
Always
Steps to Reproduce: 7.4-x86_ 64-kvm. qcow2 (we're currently running OpenStack Liberty)
1. Boot rhel-server-
2. Observe network is inaccessible
3. Use spice-console to log in and observe traceback in /var/log/cloud.log (will attach)
Actual results:
Missing /etc/sysconfig/ network- scripts/ ifcfg-lo network- scripts/ ifcfg-eth0
Missing /etc/sysconfig/
Expected results:
Populated /etc/sysconfig/ network- scripts/ ifcfg-lo network- scripts/ ifcfg-eth0
Populated /etc/sysconfig/
Additional info:
The following patch appears to resolve the issue:
--- /usr/lib/ python2. 7/site- packages/ cloudinit/ net/sysconfig. py.orig 2017-06-22 11:04:23.000000000 -0400 python2. 7/site- packages/ cloudinit/ net/sysconfig. py 2017-10-05 09:54:28.861469214 -0400 'BOOTPROTO' ] = 'static' is_ipv6( subnet) :
iface_cfg[ 'IPV6INIT' ] = True 'NETMASK' ] = '255.0.0.0'
raise ValueError("Unknown subnet type '%s' found"
" for interface '%s'" % (subnet_type,
+++ /usr/lib/
@@ -299,6 +299,9 @@
# iface_cfg[
if _subnet_
+ elif subnet_type == 'loopback':
+ iface_cfg['IPADDR'] = '127.0.0.1'
+ iface_cfg[
else: