Revert "Skip ovsdb_monitor events for ports with ofport=-1"

This patch cause some race condition in neutron-ovs-agent
and tempest-slow job was failing quite often.
Please see related bug report for details.

Closes-Bug: #1812552

This reverts commit f8e0a497ad.

Change-Id: Id51f2abaf3c8d57abdd06f024120da526ed40185
This commit is contained in:
Slawek Kaplonski 2019-01-19 23:14:41 +00:00
parent f8e0a497ad
commit f1fa9529ee
2 changed files with 0 additions and 15 deletions

View File

@ -16,7 +16,6 @@ from oslo_log import log as logging
from oslo_serialization import jsonutils
from neutron.agent.common import async_process
from neutron.agent.common import ovs_lib
from neutron.agent.ovsdb import api as ovsdb
from neutron.agent.ovsdb.native import helpers
from neutron.common import utils
@ -109,11 +108,6 @@ class SimpleInterfaceMonitor(OvsdbMonitor):
external_ids = ovsdb.val_to_py(external_ids)
if ofport:
ofport = ovsdb.val_to_py(ofport)
if ofport == ovs_lib.INVALID_OFPORT:
LOG.debug("Ofport of port %(name)s is %(ofport)s. "
"Skipping its event.",
{'name': name, 'ofport': ofport})
continue
device = {'name': name,
'ofport': ofport,
'external_ids': external_ids}

View File

@ -85,12 +85,3 @@ class TestSimpleInterfaceMonitor(base.BaseTestCase):
self.monitor.process_events()
self.assertEqual(self.monitor.new_events['added'][0]['ofport'],
ovs_lib.UNASSIGNED_OFPORT)
def process_event_invalid_of_port(self):
output = '{"data":[["e040fbec-0579-4990-8324-d338da33ae88","insert",'
output += '"m50",-1,["map",[]]]],"headings":["row","action",'
output += '"name","ofport","external_ids"]}'
with mock.patch.object(
self.monitor, 'iter_stdout', return_value=[output]):
self.monitor.process_events()
self.assertEqual([], self.monitor.new_events['added'])