ovn: Log every time a hash ring node is touched

This may help us to understand when nodes are touched and by whom.
There's a suspicion the maintenance thread gets locked / dies / not
scheduled on time and this makes nodes go offline (losing ovsdb monitor
events in the process).

Change-Id: If8d6d2200807c6fa3ada151fe202110b8853bdc5
This commit is contained in:
Ihar Hrachyshka
2025-01-16 11:11:07 -05:00
parent 90e29e852e
commit 466a4f62d2
2 changed files with 6 additions and 0 deletions

View File

@@ -1121,6 +1121,9 @@ class HashRingHealthCheckPeriodics:
# NOTE(lucasagomes): Note that we do not rely on the OVSDB lock
# here because we want the maintenance tasks from each instance to
# execute this task.
LOG.debug(
'Touching Hash Ring node "%s" from periodic health check thread',
self._node_uuid)
hash_ring_db.touch_node(self.ctx, self._node_uuid)
# Check the number of the nodes in the ring and log a message in

View File

@@ -844,6 +844,9 @@ class OvnIdlDistributedLock(BaseOvnIdl):
# the error and continue with processing the event
try:
ctx = neutron_context.get_admin_context()
LOG.debug(
'Touching Hash Ring node "%s" from IDL notify handler',
self._node_uuid)
ovn_hash_ring_db.touch_node(ctx, self._node_uuid)
except Exception:
LOG.exception('Hash Ring node %s failed to heartbeat',