← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1881806] Re: cloud-init fails to initialize with virtual router

 

** Bug watch added: bugs.centos.org/ #16933
   https://bugs.centos.org/view.php?id=16933

** Also affects: centos via
   https://bugs.centos.org/view.php?id=16933
   Importance: Unknown
       Status: Unknown

** Description changed:

  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.
+ 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'])
+   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:
  
- 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',
-         ],
- 
+     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
-     }
-   ]
+   "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.

-- 
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
Status in CentOS:
  Unknown

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 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
      }
    ]
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1881806/+subscriptions


References