← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1404962] [NEW] openvswitch mech. driver does not report error in check_segment_for_agent

 

Public bug reported:

When administrator misspells mappings for external flat networks, nova
fails with obscure trace during instance creation:

 Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2231, in _build_resources
     yield resources
   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2101, in _build_and_run_instance
     block_device_info=block_device_info)
   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2619, in spawn
     write_to_disk=True)
   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 4150, in _get_guest_xml
     context)
   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3936, in _get_guest_config
     flavor, CONF.libvirt.virt_type)
   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/vif.py", line 352, in get_config
     _("Unexpected vif_type=%s") % vif_type)
 NovaException: Unexpected vif_type=binding_failed


The real problem lies in neutron/plugins/ml2/drivers/mech_openvswitch.py:

        network_type = segment[api.NETWORK_TYPE]
        if network_type == 'local':
            return True
        elif network_type in tunnel_types:
            return True
        elif network_type in ['flat', 'vlan']:
            return segment[api.PHYSICAL_NETWORK] in mappings
        else:
            return False

If network_type is 'flat' and segment[api.PHYSICAL_NETWORK] is not in
mappings it returns False,  this causes all other problems.

Proposal: add some kind of WARNING in this place to let the
administrator know that no matching mappings found.

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1404962

Title:
  openvswitch mech. driver does not report error in
  check_segment_for_agent

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  When administrator misspells mappings for external flat networks, nova
  fails with obscure trace during instance creation:

   Traceback (most recent call last):
     File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2231, in _build_resources
       yield resources
     File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2101, in _build_and_run_instance
       block_device_info=block_device_info)
     File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2619, in spawn
       write_to_disk=True)
     File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 4150, in _get_guest_xml
       context)
     File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3936, in _get_guest_config
       flavor, CONF.libvirt.virt_type)
     File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/vif.py", line 352, in get_config
       _("Unexpected vif_type=%s") % vif_type)
   NovaException: Unexpected vif_type=binding_failed

  
  The real problem lies in neutron/plugins/ml2/drivers/mech_openvswitch.py:

          network_type = segment[api.NETWORK_TYPE]
          if network_type == 'local':
              return True
          elif network_type in tunnel_types:
              return True
          elif network_type in ['flat', 'vlan']:
              return segment[api.PHYSICAL_NETWORK] in mappings
          else:
              return False

  If network_type is 'flat' and segment[api.PHYSICAL_NETWORK] is not in
  mappings it returns False,  this causes all other problems.

  Proposal: add some kind of WARNING in this place to let the
  administrator know that no matching mappings found.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1404962/+subscriptions


Follow ups

References