From 4024168a0572519c0dd01cae0fe3e869a01ebf5a Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Fri, 11 Mar 2022 17:03:24 +0100 Subject: [PATCH] Add extra logs to the ip_monitor class Those extra logs should tell more about what IP addresses are added/removed in the qrouter namespace by the keepalived process and hopefully help us understand failures in functional CI job, like are described in the related bug. Related-bug: #1956958 Change-Id: I5e924922baffbf2e059f243b115ff799e8432a56 --- neutron/agent/linux/ip_lib.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neutron/agent/linux/ip_lib.py b/neutron/agent/linux/ip_lib.py index 3306f039935..f5d388c0a27 100644 --- a/neutron/agent/linux/ip_lib.py +++ b/neutron/agent/linux/ip_lib.py @@ -1474,6 +1474,8 @@ def ip_monitor(namespace, queue, event_stop, event_started): while True: ip_addresses = _ip.get() for ip_address in ip_addresses: + LOG.debug("IP monitor %s; Adding IP address: %s " + "to the queue.", namespace, ip_address) _queue.put(ip_address) except EOFError: pass @@ -1493,6 +1495,8 @@ def ip_monitor(namespace, queue, event_stop, event_started): while not event_stop.is_set(): try: ip_address = _queue.get(timeout=1) + LOG.debug("IP monitor %s; IP address to process: %s", + namespace, ip_address) except eventlet.queue.Empty: continue if 'index' in ip_address and 'prefixlen' in ip_address: @@ -1502,6 +1506,8 @@ def ip_monitor(namespace, queue, event_stop, event_started): if not name: continue + LOG.debug("IP monitor %s; Queueing IP address: %s; device: %s", + namespace, ip_address, name) cache_devices[index] = name queue.put(_parse_ip_address(ip_address, name))