Network configuration broken for some distributions with OpenNebula, EC2, Azure
Bug #1792454 reported by
Thomas Berger
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Unassigned |
Bug Description
The DataSources Azure, EC2 and OpenNebula providing the network configuration in the v2 format.
Distributions that make use of `net_util.
These distributions are:
- Arch
- FreeBSD
- Gentoo
- OpenSUSE
- RHEL
Related branches
~loki-8/cloud-init:fix/1792454-netork-configuration-v2-and-translate_network
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Approve
- Ryan Harper: Needs Fixing
-
Diff: 93 lines (+58/-0)2 files modifiedcloudinit/distros/net_util.py (+19/-0)
tests/unittests/test_distros/test_netconfig.py (+39/-0)
To post a comment you must log in.
Via IRC, the discussion mentions that the incoming eni file has ip/cidr vs ip/netmask.
OpenNebula Datasource now has a network_config property which returns netplan (v2) config.
Here's what's happening
cloudinit. stages. Init.apply_ network_ config distro. apply_network_ config( ) distro. gentoo. apply_network_ config( ) # this fails, not implemented distro. _apply_ network_ from_network_ config net.network_ state.parse_ net_config_ data() net.eni. network_ state_to_ eni() distro. apply_network( )
cloudinit. distro. gentoo. _write_ network( )
cloudinit.
cloudinit.
cloudinit.
cloudinit.
cloudinit.
cloudinit.
Thus this converts OpenNebula netplan into internal state, and then into eni, passing that to distros to call net_util. translate_ settings.
The issue is that if the eni passed in uses address 192.168.23.1/24, then the parser does not provide a 'netmask' key in the returned dictionary which all of the distros using net_util expect.