]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Avoid processing ports which are not yet ready
authorSalvatore Orlando <salv.orlando@gmail.com>
Mon, 13 Jan 2014 20:51:03 +0000 (12:51 -0800)
committerSalvatore Orlando <salv.orlando@gmail.com>
Thu, 13 Feb 2014 23:38:05 +0000 (15:38 -0800)
commit2702baed390d094b0eac07d0ae167ed236868d00
tree66c4d21bda9c3ec5e83a0cf973e3ba53f1acfe74
parent4d63a13681b53c4436bbe9ec40c38cea36ea50a0
Avoid processing ports which are not yet ready

This patch changes get_vif_port_set in order to not return
OVS ports for which the ofport is not yet assigned, thus avoiding
a regex match failure in get_vif_port_by_id.
Because of this failure, treat_vif_port is unable to wire
the port.
As get_vif_port_by_id is also used elsewhere in the agent, it has
been enhanced in order to tolerate situations in which ofport might
have not yet been assigned.

The ofport field is added to the list of those monitored by the
SimpleInterfaceMonitor. This will guarantee an event is generated
when the ofport is assigned to a port. Otherwise there is a risk
a port would be never processed if it was not yet ready the first
time is was detected. This change won't trigger any extra processing
on the agent side.

Finally, this patch avoids fetching device details from the plugin
for ports which have disappeared from the OVS bridge. This is a
little optimization which might be beneficial for short lived ports.

Change-Id: Icf7f0c7d6fe5239a358567cc9dc9db8ec11c15be
Partial-Bug: #1253896
neutron/agent/linux/ovs_lib.py
neutron/agent/linux/ovsdb_monitor.py
neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/openvswitch/test_ovs_lib.py
neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py