From a9a817e428a5ec71c478a48b4e29378b9daeb410 Mon Sep 17 00:00:00 2001 From: Ann Taraday Date: Thu, 8 Oct 2020 12:28:18 +0400 Subject: [PATCH] Use run_flow for failover functions in v2 control worker Align failover_amphora and failover_loadbalancer to use run_flow. Also avoid NoneType error in logging of create_health_monitor. Change-Id: I1b4c18d3bec5ff62adf48d3d751d553eb359ccbe --- octavia/controller/worker/v2/controller_worker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/octavia/controller/worker/v2/controller_worker.py b/octavia/controller/worker/v2/controller_worker.py index e824fc2d83..ac64b4b48a 100644 --- a/octavia/controller/worker/v2/controller_worker.py +++ b/octavia/controller/worker/v2/controller_worker.py @@ -172,7 +172,7 @@ class ControllerWorker(object): if not db_health_monitor: LOG.warning('Failed to fetch %s %s from DB. Retrying for up to ' '60 seconds.', 'healthmonitor', - db_health_monitor[constants.HEALTHMONITOR_ID]) + health_monitor[constants.HEALTHMONITOR_ID]) raise db_exceptions.NoResultFound pool = db_health_monitor.pool @@ -922,7 +922,7 @@ class ControllerWorker(object): constants.LOADBALANCER_ID: lb_id, constants.VIP: vip_dict} - self.services_controller.run_poster( + self.run_flow( flow_utils.get_failover_amphora_flow, amphora.to_dict(), lb_amp_count, store=stored_params, wait=True) @@ -1074,7 +1074,7 @@ class ControllerWorker(object): else: stored_params[constants.AVAILABILITY_ZONE] = {} - self.services_controller.run_poster( + self.run_flow( flow_utils.get_failover_LB_flow, amps, provider_lb_dict, store=stored_params, wait=True)