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:
I am following cloud init guide to provide Networking Config Version 1 (http://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v1.html) format data to customize my VM network interface. It works for ethernet port bug crashed with bond configuraton, log is similiar as the following:
...
Traceback (most recent call last):
File "./tools/net-convert.py", line 82, in <module>
main()
File "./tools/net-convert.py", line 78, in main
r.render_network_state(ns, target=args.directory)
File "/home/smoser-public/src/cloud-init/cloud-init/cloudinit/net/sysconfig.py", line 397, in render_network_state
network_state).items():
File "/home/smoser-public/src/cloud-init/cloud-init/cloudinit/net/sysconfig.py", line 379, in _render_sysconfig
cls._render_bond_interfaces(network_state, iface_contents)
File "/home/smoser-public/src/cloud-init/cloud-init/cloudinit/net/sysconfig.py", line 315, in _render_bond_interfaces
iface_master_name = iface['bond-master']
KeyError: 'bond-master'
Someone have reported the same problem: https://bugs.launchpad.net/cloud-init/+bug/1682014, But it has been fixed in https://bugs.launchpad.net/cloud-init/+bug/1695092 (Fixed in Cloud-init 17.1)
Version-Release number of selected component (if applicable):
cloud-init-0.7.9-9.el7_4.1.x86_64
How reproducible:
Follow Networking Config Version 1 to customize bond interface, like the following:
version: 1
config:
- type: physical
name: eth0
mac_address: 94:18:82:6f:3b:1c
subnets:
- type: static
address: 172.20.0.30/24
- type: physical
name: eth1
mac_address: 94:18:82:6f:3b:1d
subnets:
- type: dhcp4
- type: physical
name: eth2
mac_address: 94:18:82:6f:3b:1e
subnets:
- type: dhcp4
- type: physical
name: eth3
mac_address: 94:18:82:6f:3b:1f
subnets:
- type: dhcp4
- type: bond
name: bond0
bond_interfaces:
- eth1
- eth2
params:
miimon: 100
mode: 1
subnets:
- type: static
address: 192.168.5.100/24
- type: route
destination: 0.0.0.0/0
gateway: 172.16.1.1
Steps to Reproduce:
1. Generate cidata iso which contains meta-data, user-data, network-config, network-config should have the upper contents
2. Use kvm to bring up a redhat7.4/centos7.4 cloud image with iso attached.
3. Check /var/log/cloud-init.log after instance up. bond configuration failed with exception
Actual results:
network config failed/terminated with exception
Expected results:
Network configuration is done for bond
Additional info:
Please integrated latest version of cloud-init(this bug should have been fixed in Cloud-init 17.1)
(In reply to Logan V from comment #7)
> cloud-init-18.2-1.el7.centos.1.x86_64 appears to contain the fix I mentioned
> in #2, so I think this is resolved now.
Can you verify if the issue is fixed and close the bz?
I can confirm it working well with redhat 7.6 and cloud-init 18.2, the network-config is exactly the same as the issue description part:
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
# rpm -qa |grep cloud-init
cloud-init-18.2-1.el7_6.1.x86_64
# cat /etc/sysconfig/network-scripts/ifcfg-eth1
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth1
HWADDR=94:18:82:6f:3b:1d
MASTER=bond0
ONBOOT=yes
SLAVE=yes
TYPE=Ethernet
USERCTL=no
# cat /etc/sysconfig/network-scripts/ifcfg-eth2
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth2
HWADDR=94:18:82:6f:3b:1e
MASTER=bond0
ONBOOT=yes
SLAVE=yes
TYPE=Ethernet
USERCTL=no
# cat /etc/sysconfig/network-scripts/ifcfg-bond0
# Created by cloud-init on instance boot automatically, do not edit.
#
BONDING_MASTER=yes
BONDING_SLAVE0=eth1
BONDING_SLAVE1=eth2
BOOTPROTO=none
DEVICE=bond0
IPADDR=192.168.5.100
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Bond
USERCTL=no