_restore_local_vlan_map raises exception for untagged flat networks

Bug #1507770 reported by Eric Larese
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Confirmed
High
Hong Hui Xiao

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.

Changed in neutron:
importance: Undecided → High
status: New → Confirmed
description: updated
Hong Hui Xiao (xiaohhui)
Changed in neutron:
assignee: nobody → Hong Hui Xiao (xiaohhui)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.