Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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:
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)
Actual results:
Missing /etc/sysconfig/network-scripts/ifcfg-lo
Missing /etc/sysconfig/network-scripts/ifcfg-eth0
Expected results:
Populated /etc/sysconfig/network-scripts/ifcfg-lo
Populated /etc/sysconfig/network-scripts/ifcfg-eth0
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
+++ /usr/lib/python2.7/site-packages/cloudinit/net/sysconfig.py 2017-10-05 09:54:28.861469214 -0400
@@ -299,6 +299,9 @@
# iface_cfg['BOOTPROTO'] = 'static'
if _subnet_is_ipv6(subnet):
iface_cfg['IPV6INIT'] = True
+ elif subnet_type == 'loopback':
+ iface_cfg['IPADDR'] = '127.0.0.1'
+ iface_cfg['NETMASK'] = '255.0.0.0'
else:
raise ValueError("Unknown subnet type '%s' found"
" for interface '%s'" % (subnet_type,
Greg, did you submit the patch attached here upstream? I don't see it attached to the bug report. It may help to move things along. If you don't have time or have not signed the CLA, I could do it for you.
Hi Ryan, I have not submitted the patch upstream, as I wasn't sure whether RHEL builds of cloud-init would follow a policy of tracking upstream (a la Fedora), or if the plan was to backport fixes to the version already in RHEL. Given the number of RHEL patches already being applied, I guess I was assuming that Red Hat would likely backport a patch as opposed to pulling a new version from upstream.
I haven't signed the CLA, as I haven't yet had any direct interaction with the cloud-init people, other than with Josh Harlow (who I work with).
Our rule is that fixes need to be accepted upstream before we ship them. If the problem is fixed in the current upstream version already, then we'd backport the patch, or rework the fix, if it's not possible to directly backport. I didn't get the impression the issue was resolved upstream, though, as the issue on launchpad is still in the confirmed state.
I think this may be fixed as a side-effect of another set of patches that had to be pulled in to fix another network config bug. Could you give the package at people.redhat.com/rmccabe/cloud-init/cloud-init-0.7.9-15.el7.x86_64.rpm a shot to see if it resolves the problem?
I tested against cloud-init-0.7.9-15.el7.x86_64.rpm as provided above, and it appears to resolve the issue.
Tested against RHEL 7.4 and CentOS 7.4 images (same images that were used originally when reporting the error), and I'm no longer seeing the exception.
/etc/sysconfig/network-scripts/ifcfg-eth0 appears to contain the expected values. /etc/sysconfig/network-scripts/ifcfg-lo does not appear to be created but I do see the loopback interface configured.
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: 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) Actual results: Missing /etc/sysconfig/network-scripts/ifcfg-lo Missing /etc/sysconfig/network-scripts/ifcfg-eth0 Expected results: Populated /etc/sysconfig/network-scripts/ifcfg-lo Populated /etc/sysconfig/network-scripts/ifcfg-eth0 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 +++ /usr/lib/python2.7/site-packages/cloudinit/net/sysconfig.py 2017-10-05 09:54:28.861469214 -0400 @@ -299,6 +299,9 @@ # iface_cfg['BOOTPROTO'] = 'static' if _subnet_is_ipv6(subnet): iface_cfg['IPV6INIT'] = True + elif subnet_type == 'loopback': + iface_cfg['IPADDR'] = '127.0.0.1' + iface_cfg['NETMASK'] = '255.0.0.0' else: raise ValueError("Unknown subnet type '%s' found" " for interface '%s'" % (subnet_type,