network Renderer for rhel is unavailable when render bond/vlan interface.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Confirmed
|
Medium
|
Unassigned |
Bug Description
In rhel, when use clodinit to config network from network_data.json, network renderer cann't work well when render bond or vlan.
In sysconfig renderer, '_render_
apart from this, '_render_
@classmethod
def _render_
bond_filter = renderer.
for iface in network_
if len(iface_subnets) == 1:
elif len(iface_subnets) > 1:
for i, iface_subnet in enumerate(
for master_cfg in master_cfgs:
@classmethod
def _render_
vlan_filter = renderer.
for iface in network_
if len(iface_subnets) == 1:
elif len(iface_subnets) > 1:
for i, iface_subnet in enumerate(
Changed in cloud-init: | |
status: | New → Confirmed |
tags: | added: centos7 |
tags: | added: redhat7 |
Heres a recreate:
$ cat bond.yaml interfaces: [eth0, eth1]
## Notes:
## * I had to add 'subnets' to the physical entries. that is a bug too.
## * if 'mac_address' is omitted from bond0, bond should use first slave addr
##
version: 1
config:
- type: physical
name: eth0
subnets: []
- type: physical
name: eth1
subnets: []
- type: bond
name: bond0
mac_address: "aa:bb:cc:dd:ee:ff"
bond_
params:
bond-mode: active-backup
subnets:
- type: dhcp4
$ PYTHONPATH=$PWD ./tools/ net-convert. py --network- data=bond. yaml --kind=yaml \ kind=sysconfig --directory=out.d net-convert. py", line 82, in <module> net-convert. py", line 78, in main network_ state(ns, target= args.directory) smoser- public/ src/cloud- init/cloud- init/cloudinit/ net/sysconfig. py", line 397, in render_ network_ state state). items() : smoser- public/ src/cloud- init/cloud- init/cloudinit/ net/sysconfig. py", line 379, in _render_sysconfig _render_ bond_interfaces (network_ state, iface_contents) smoser- public/ src/cloud- init/cloud- init/cloudinit/ net/sysconfig. py", line 315, in _render_ bond_interfaces master_ name = iface[' bond-master' ]
--output-
...
Traceback (most recent call last):
File "./tools/
main()
File "./tools/
r.render_
File "/home/
network_
File "/home/
cls.
File "/home/
iface_
KeyError: 'bond-master'