Never raise an exception in notify()
notify() is called from python-ovs code which is not built to recover from an exception in this user-overriden code. If there is an exception (e.g. the DB server is down when we process the hash ring), this exception can cause an unrecoverable error in processing OVSDB messages, rendering the neutron worker useless. Change-Id: I5f703d82175d71a222c76df37a82b5ccad890d14 (cherry picked from commit67e616b238
) (cherry picked from commit848787785e
) Conflicts: neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovsdb_monitor.py (cherry picked from commit3566cc065e
)
This commit is contained in:
parent
a4514641e9
commit
de8f74aec8
|
@ -567,6 +567,7 @@ class OvnIdlDistributedLock(BaseOvnIdl):
|
|||
self._last_touch = None
|
||||
|
||||
def notify(self, event, row, updates=None):
|
||||
try:
|
||||
self.notify_handler.notify(event, row, updates, global_=True)
|
||||
try:
|
||||
target_node = self._hash_ring.get_node(str(row.uuid))
|
||||
|
@ -597,8 +598,11 @@ class OvnIdlDistributedLock(BaseOvnIdl):
|
|||
'handling event "%(event)s" for row %(row)s '
|
||||
'(table: %(table)s)',
|
||||
{'node': self._node_uuid, 'hostname': CONF.host,
|
||||
'event': event, 'row': row.uuid, 'table': row._table.name})
|
||||
'event': event, 'row': row.uuid,
|
||||
'table': row._table.name})
|
||||
self.notify_handler.notify(event, row, updates)
|
||||
except Exception as e:
|
||||
LOG.exception(e)
|
||||
|
||||
@abc.abstractmethod
|
||||
def post_connect(self):
|
||||
|
|
Loading…
Reference in New Issue