← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1507770] [NEW] _restore_local_vlan_map raises exception for untagged flat networks

 

Public bug reported:

This line:

https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py#L359

can raise exception when _restore_local_vlan_map runs in environments
with flat or untagged VLAN networks.  For example:

  File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 301, in __init__
     self._restore_local_vlan_map()
   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 360, in _restore_local_vlan_map
     'segmentation_id']),
 ValueError: invalid literal for int() with base 10: 'None'


It appears the reason for this is because the command "ovs-vsctl list Port" is returning port entries that have segmentation_id as None, for example like this:

other_config        : {net_uuid="34baaa59-db42-4551-a1f0-0b2af85c288b",
network_type=flat, physical_network=default, segmentation_id=None}

This code already handles the case where net_uuid is missing or
local_vlan is DEAD_VLAN_TAG, but I think it should also handle the case
where segmentation_id is missing.

Should I propose this change?

** 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/1507770

Title:
  _restore_local_vlan_map raises exception for untagged flat networks

Status in neutron:
  New

Bug description:
  This line:

  https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py#L359

  can raise exception when _restore_local_vlan_map runs in environments
  with flat or untagged VLAN networks.  For example:

    File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 301, in __init__
       self._restore_local_vlan_map()
     File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 360, in _restore_local_vlan_map
       'segmentation_id']),
   ValueError: invalid literal for int() with base 10: 'None'

  
  It appears the reason for this is because the command "ovs-vsctl list Port" is returning port entries that have segmentation_id as None, for example like this:

  other_config        :
  {net_uuid="34baaa59-db42-4551-a1f0-0b2af85c288b", network_type=flat,
  physical_network=default, segmentation_id=None}

  This code already handles the case where net_uuid is missing or
  local_vlan is DEAD_VLAN_TAG, but I think it should also handle the
  case where segmentation_id is missing.

  Should I propose this change?

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