[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
This commit is contained in:
Salvatore Orlando 2021-09-24 07:41:51 -07:00 committed by Salvatore Orlando
parent 8347bd12bd
commit 2ef3b45c7b
1 changed files with 3 additions and 0 deletions

View File

@ -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: