Fix failover of az-specific loadbalancers
There is a bug exists in CalculateAmphoraDelta class
If there is no such a key as constants.MANAGEMENT_NETWORK
in availability_zone dictionary, method get will return None
It means that management_nets list will become [None], not
CONF.controller_worker.amp_boot_network_list as it supposes to be
It breaks the following failover flow
Story: 2008669
Task: 41957
Change-Id: I435c40a5493828bce24c2850182f0ddc8e5bdd1f
(cherry picked from commit 81134bdfec
)
This commit is contained in:
parent
60b14c69dc
commit
77a87a7f33
|
@ -59,10 +59,10 @@ class CalculateAmphoraDelta(BaseNetworkTask):
|
|||
|
||||
if vrrp_port is None:
|
||||
vrrp_port = self.network_driver.get_port(amphora.vrrp_port_id)
|
||||
if availability_zone:
|
||||
management_nets = (
|
||||
[availability_zone.get(constants.MANAGEMENT_NETWORK)] or
|
||||
CONF.controller_worker.amp_boot_network_list)
|
||||
if (availability_zone and
|
||||
availability_zone.get(constants.MANAGEMENT_NETWORK)):
|
||||
management_nets = [availability_zone.get(
|
||||
constants.MANAGEMENT_NETWORK)]
|
||||
else:
|
||||
management_nets = CONF.controller_worker.amp_boot_network_list
|
||||
desired_network_ids = {vrrp_port.network_id}.union(management_nets)
|
||||
|
|
Loading…
Reference in New Issue