From 2ef3b45c7b44e67d7c75c0bd179517021c6c0f06 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Fri, 24 Sep 2021 07:41:51 -0700 Subject: [PATCH] [API replay] Do not collect Octavia stats in API replay mode Skip the operation as the RPC server may not be available and during API replay mode Neutron does not need to perform this operation. Change-Id: Icf848acccfddb760a85b4b182d5050bbd45f3871 --- vmware_nsx/services/lbaas/octavia/octavia_listener.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vmware_nsx/services/lbaas/octavia/octavia_listener.py b/vmware_nsx/services/lbaas/octavia/octavia_listener.py index 6976f29fbd..cc83743bd8 100644 --- a/vmware_nsx/services/lbaas/octavia/octavia_listener.py +++ b/vmware_nsx/services/lbaas/octavia/octavia_listener.py @@ -744,6 +744,9 @@ class NSXOctaviaStatisticsCollector(object): LOG.info("NSXOctaviaStatisticsCollector thread_runner is running") while True: time.sleep(interval) + if cfg.CONF.api_replay_mode: + LOG.debug("Not collecting Octavia stats in API replay mode") + continue try: self.collect() except Exception as e: