[API replay] Avoid Octavia RPC errors
During API replay we should not call get_active_loadbalancers or try and serve it, as the replay process will act both as a client and RPC server. Change-Id: I7cd620c2cca3ee8ac6e558f5aa7cb67a71e6b25b
This commit is contained in:
parent
9062ba2f00
commit
dc308d59d8
@ -1272,6 +1272,10 @@ class ApiReplayClient(utils.PrepareObjectForMigration):
|
||||
# Do nothing
|
||||
pass
|
||||
|
||||
def get_active_loadbalancers(self, **kw):
|
||||
# Do nothing
|
||||
pass
|
||||
|
||||
endpoints = [MigrationOctaviaDriverEndpoint]
|
||||
access_policy = dispatcher.DefaultRPCAccessPolicy
|
||||
self.octavia_rpc_server = messaging.get_rpc_server(
|
||||
|
@ -753,7 +753,7 @@ class NSXOctaviaStatisticsCollector(object):
|
||||
LOG.error("Octavia stats collect failed with %s", e)
|
||||
|
||||
def collect(self):
|
||||
if not self.core_plugin.octavia_listener:
|
||||
if not self.core_plugin.octavia_listener or cfg.CONF.api_replay_mode:
|
||||
LOG.warning("Octavia stats collector cannot run with plugin %s",
|
||||
self.core_plugin)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user