cloud-init v2 yaml doesn't preserve bond/bridge parameters when rendering
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Unassigned |
Bug Description
cloud-init/master:
% cat bonding.yaml
network:
version: 2
ethernets:
eth0:
match:
macaddress: 52:54:00:12:34:00
driver: virtio
set-name: eth0
ens4:
match:
macaddress: 52:54:00:12:34:02
driver: e1000
set-name: ens4
bonds:
bond0:
interfaces: [eth0, ens4]
parameters:
mode: active-backup
dhcp4: true
Should result in a netplan yaml of:
network:
version: 2
ethernets:
ens4:
match:
eth0:
match:
bonds:
bond0:
dhcp4: true
- ens4
- eth0
Multiple issues:
1) the common bond/bridge handler needs to call the right _handle function depending on the command type (bond or bridge)
2) network_state needs to translate v2 'parameters' key to v1 since we utilize the v1 type handlers
3) the v2 handle_ethernets fails to set the v1 'mac_address' property which prevents v2 match/set-name from getting rendered
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 4127 lines (+2892/-256)41 files modifiedMakefile (+3/-3)
cloudinit/analyze/__init__.py (+0/-0)
cloudinit/analyze/__main__.py (+155/-0)
cloudinit/analyze/dump.py (+176/-0)
cloudinit/analyze/show.py (+207/-0)
cloudinit/analyze/tests/test_dump.py (+210/-0)
cloudinit/cmd/main.py (+15/-29)
cloudinit/config/cc_ntp.py (+45/-13)
cloudinit/distros/arch.py (+59/-31)
cloudinit/net/__init__.py (+134/-46)
cloudinit/net/dhcp.py (+119/-0)
cloudinit/net/netplan.py (+9/-26)
cloudinit/net/network_state.py (+69/-16)
cloudinit/net/sysconfig.py (+5/-1)
cloudinit/net/tests/__init__.py (+0/-0)
cloudinit/net/tests/test_dhcp.py (+144/-0)
cloudinit/net/tests/test_init.py (+522/-0)
cloudinit/sources/DataSourceAliYun.py (+6/-3)
cloudinit/sources/DataSourceEc2.py (+99/-22)
cloudinit/sources/DataSourceOVF.py (+62/-1)
cloudinit/sources/helpers/vmware/imc/config.py (+21/-3)
cloudinit/sources/helpers/vmware/imc/config_passwd.py (+67/-0)
debian/changelog (+28/-0)
doc/rtd/index.rst (+1/-0)
doc/rtd/topics/capabilities.rst (+40/-10)
doc/rtd/topics/debugging.rst (+146/-0)
setup.py (+1/-1)
templates/timesyncd.conf.tmpl (+8/-0)
tests/cloud_tests/bddeb.py (+9/-7)
tests/unittests/helpers.py (+1/-1)
tests/unittests/test_cli.py (+84/-3)
tests/unittests/test_datasource/test_aliyun.py (+6/-5)
tests/unittests/test_datasource/test_common.py (+1/-0)
tests/unittests/test_datasource/test_ec2.py (+112/-24)
tests/unittests/test_distros/__init__.py (+21/-0)
tests/unittests/test_distros/test_arch.py (+45/-0)
tests/unittests/test_distros/test_netconfig.py (+2/-2)
tests/unittests/test_handler/test_handler_ntp.py (+101/-4)
tests/unittests/test_net.py (+118/-0)
tests/unittests/test_vmware_config_file.py (+30/-2)
tox.ini (+11/-3)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 2996 lines (+1895/-223)32 files modifiedMakefile (+2/-2)
cloudinit/config/cc_ntp.py (+45/-13)
cloudinit/distros/arch.py (+59/-31)
cloudinit/net/__init__.py (+134/-46)
cloudinit/net/dhcp.py (+119/-0)
cloudinit/net/netplan.py (+9/-26)
cloudinit/net/network_state.py (+69/-16)
cloudinit/net/sysconfig.py (+5/-1)
cloudinit/net/tests/__init__.py (+0/-0)
cloudinit/net/tests/test_dhcp.py (+144/-0)
cloudinit/net/tests/test_init.py (+522/-0)
cloudinit/sources/DataSourceAliYun.py (+6/-3)
cloudinit/sources/DataSourceEc2.py (+99/-22)
cloudinit/sources/DataSourceOVF.py (+62/-1)
cloudinit/sources/helpers/vmware/imc/config.py (+21/-3)
cloudinit/sources/helpers/vmware/imc/config_passwd.py (+67/-0)
debian/changelog (+26/-0)
doc/rtd/topics/capabilities.rst (+40/-10)
setup.py (+1/-1)
templates/timesyncd.conf.tmpl (+8/-0)
tests/cloud_tests/bddeb.py (+9/-7)
tests/unittests/helpers.py (+1/-1)
tests/unittests/test_datasource/test_aliyun.py (+6/-5)
tests/unittests/test_datasource/test_common.py (+1/-0)
tests/unittests/test_datasource/test_ec2.py (+112/-24)
tests/unittests/test_distros/__init__.py (+21/-0)
tests/unittests/test_distros/test_arch.py (+45/-0)
tests/unittests/test_distros/test_netconfig.py (+2/-2)
tests/unittests/test_handler/test_handler_ntp.py (+101/-4)
tests/unittests/test_net.py (+118/-0)
tests/unittests/test_vmware_config_file.py (+30/-2)
tox.ini (+11/-3)
- Server Team CI bot: Approve (continuous-integration)
- Chad Smith: Approve
-
Diff: 401 lines (+195/-44)4 files modifiedcloudinit/net/netplan.py (+9/-26)
cloudinit/net/network_state.py (+69/-16)
tests/unittests/test_distros/test_netconfig.py (+2/-2)
tests/unittests/test_net.py (+115/-0)
Changed in cloud-init: | |
importance: | Undecided → Medium |
This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New
Thank you.