Activity log for bug #1881806

Date Who What changed Old value New value Message
2020-06-02 20:02:35 Imtiaz Chowdhury bug added bug
2020-06-02 20:39:48 Imtiaz Chowdhury bug watch added https://bugs.centos.org/view.php?id=16933
2020-06-02 20:39:48 Imtiaz Chowdhury bug task added centos
2020-06-02 20:44:09 Imtiaz Chowdhury 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. 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 final stages of cloud-init to fail. 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. Reproducibility: always 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 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     }   ] }
2020-06-02 21:12:02 Ryan Harper cloud-init: status New Invalid
2020-06-02 21:32:53 Imtiaz Chowdhury 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 final stages of cloud-init to fail. 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. Reproducibility: always 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 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     }   ] } 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 final stages of cloud-init to fail. 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. Reproducibility: always 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 cloudinit/sources/helpers/openstack.py file which only expects 'link' type to 'vlan' only. elif link['type'] in ['vlan']: name = "%s.%s" % (link['vlan_link'], link['vlan_id']) cfg.update({ 'name': name, 'vlan_id': link['vlan_id'], 'mac_address': link['vlan_mac_address'], }) link_updates.append((cfg, 'vlan_link', '%s', link['vlan_link'])) link_updates.append((cfg, 'name', "%%s.%s" % link['vlan_id'], link['vlan_link'])) curinfo.update({'mac': link['vlan_mac_address'], 'name': name}) else: raise ValueError( 'Unknown network_data link type: %s' % link['type']) 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", <------------------ NOTE: The link type       "vif_id": "722bcc7f-5ae5-4564-ad43-ff9a5357dd36",       "ethernet_mac_address": "02:72:2b:cc:7f:5a",       "id": "tap722bcc7f-5a",       "mtu": null     }   ] }
2023-05-12 06:46:28 James Falcon bug watch added https://github.com/canonical/cloud-init/issues/3699