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 commit81134bdfec
) (cherry picked from commit77a87a7f33
) (cherry picked from commite3026d3582
)
This commit is contained in:
parent
178481be9a
commit
0b4e05aeb6
|
@ -59,10 +59,10 @@ class CalculateAmphoraDelta(BaseNetworkTask):
|
||||||
|
|
||||||
if vrrp_port is None:
|
if vrrp_port is None:
|
||||||
vrrp_port = self.network_driver.get_port(amphora.vrrp_port_id)
|
vrrp_port = self.network_driver.get_port(amphora.vrrp_port_id)
|
||||||
if availability_zone:
|
if (availability_zone and
|
||||||
management_nets = (
|
availability_zone.get(constants.MANAGEMENT_NETWORK)):
|
||||||
[availability_zone.get(constants.MANAGEMENT_NETWORK)] or
|
management_nets = [availability_zone.get(
|
||||||
CONF.controller_worker.amp_boot_network_list)
|
constants.MANAGEMENT_NETWORK)]
|
||||||
else:
|
else:
|
||||||
management_nets = CONF.controller_worker.amp_boot_network_list
|
management_nets = CONF.controller_worker.amp_boot_network_list
|
||||||
desired_network_ids = {vrrp_port.network_id}.union(management_nets)
|
desired_network_ids = {vrrp_port.network_id}.union(management_nets)
|
||||||
|
|
Loading…
Reference in New Issue