Public bug reported: Cloud-init fails to initialize with RHEL8.1 and CentOS8.1 (RPM cloud- init-18.5-7.el8_1.1.noarch) when routing to the VMs are provider by virtual router (vrouter). In this scenario, we are spawning a VM on OpenStack using Contrail as the network provider. With cloud-init-18.5 version, we see the following exception during the VM boot phase causing init and finals stages of cloud-init to fail.
2020-06-02 19:17:15,641 - util.py[WARNING]: failed stage init failed run of stage init ------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 652, in status_wrapper ret = functor(name, args) File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 362, in main_init init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL)) File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 649, in apply_network_config netcfg, src = self._find_networking_config() File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 636, in _find_networking_config if self.datasource and hasattr(self.datasource, 'network_config'): File "/usr/lib/python3.6/site-packages/cloudinit/sources/DataSourceOpenStack.py", line 115, in network_config self.network_json, known_macs=None) File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/openstack.py", line 645, in convert_net_json 'Unknown network_data link type: %s' % link['type']) ValueError: Unknown network_data link type: vrouter The error seems to be coming from /usr/lib/python3.6/site-packages/cloudinit/sources/helpers/openstack.py file which only expects 'link' type to be only of one of the following: valid_keys = { 'physical': [ 'name', 'type', 'mac_address', 'subnets', 'params', 'mtu', ], However, with Contrail, the network_config object that gets passed to the method convert_net_json looks something like the following object: { "services": [], "networks": [ { "network_id": "f42c8806-c128-4ef8-af9e-d4a3856dde23", "type": "ipv4", "netmask": "255.255.255.192", "link": "tap722bcc7f-5a", "routes": [ { "netmask": "0.0.0.0", "network": "0.0.0.0", "gateway": "10.140.145.126" } ], "ip_address": "10.140.145.110", "id": "network0" } ], "links": [ { "type": "vrouter", "vif_id": "722bcc7f-5ae5-4564-ad43-ff9a5357dd36", "ethernet_mac_address": "02:72:2b:cc:7f:5a", "id": "tap722bcc7f-5a", "mtu": null } ] } Impact: cloud-init fails to inject ssh-keys, grow root partition and other critical functions. Version cloud-init-18.2-6.el8.noarch of cloud-init did not have this issue. ** Affects: cloud-init Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to cloud-init. https://bugs.launchpad.net/bugs/1881806 Title: cloud-init fails to initialize with virtual router Status in cloud-init: New Bug description: Cloud-init fails to initialize with RHEL8.1 and CentOS8.1 (RPM cloud- init-18.5-7.el8_1.1.noarch) when routing to the VMs are provider by virtual router (vrouter). In this scenario, we are spawning a VM on OpenStack using Contrail as the network provider. With cloud-init-18.5 version, we see the following exception during the VM boot phase causing init and finals stages of cloud-init to fail. 2020-06-02 19:17:15,641 - util.py[WARNING]: failed stage init failed run of stage init ------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 652, in status_wrapper ret = functor(name, args) File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 362, in main_init init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL)) File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 649, in apply_network_config netcfg, src = self._find_networking_config() File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 636, in _find_networking_config if self.datasource and hasattr(self.datasource, 'network_config'): File "/usr/lib/python3.6/site-packages/cloudinit/sources/DataSourceOpenStack.py", line 115, in network_config self.network_json, known_macs=None) File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/openstack.py", line 645, in convert_net_json 'Unknown network_data link type: %s' % link['type']) ValueError: Unknown network_data link type: vrouter The error seems to be coming from /usr/lib/python3.6/site-packages/cloudinit/sources/helpers/openstack.py file which only expects 'link' type to be only of one of the following: valid_keys = { 'physical': [ 'name', 'type', 'mac_address', 'subnets', 'params', 'mtu', ], However, with Contrail, the network_config object that gets passed to the method convert_net_json looks something like the following object: { "services": [], "networks": [ { "network_id": "f42c8806-c128-4ef8-af9e-d4a3856dde23", "type": "ipv4", "netmask": "255.255.255.192", "link": "tap722bcc7f-5a", "routes": [ { "netmask": "0.0.0.0", "network": "0.0.0.0", "gateway": "10.140.145.126" } ], "ip_address": "10.140.145.110", "id": "network0" } ], "links": [ { "type": "vrouter", "vif_id": "722bcc7f-5ae5-4564-ad43-ff9a5357dd36", "ethernet_mac_address": "02:72:2b:cc:7f:5a", "id": "tap722bcc7f-5a", "mtu": null } ] } Impact: cloud-init fails to inject ssh-keys, grow root partition and other critical functions. Version cloud-init-18.2-6.el8.noarch of cloud-init did not have this issue. To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1881806/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp