Network configuration broken for some distributions with OpenNebula, EC2, Azure

Bug #1792454 reported by Thomas Berger on 2018-09-13
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
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.translate_network` are not working with v2 network configurations.

These distributions are:

- Arch
- FreeBSD
- Gentoo
- OpenSUSE
- RHEL

Related branches

Ryan Harper (raharper) wrote :

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
  cloudinit.distro.apply_network_config()
     cloudinit.distro.gentoo.apply_network_config() # this fails, not implemented
  cloudinit.distro._apply_network_from_network_config
     cloudinit.net.network_state.parse_net_config_data()
     cloudinit.net.eni.network_state_to_eni()
     cloudinit.distro.apply_network()
         cloudinit.distro.gentoo._write_network()

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.

Changed in cloud-init:
importance: Undecided → High
status: New → Confirmed

This bug is fixed with commit 98d18c31 to cloud-init on branch master.
To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=98d18c31

Changed in cloud-init:
status: Confirmed → Fix Committed

This bug is believed to be fixed in cloud-init in version 18.4. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers