Fix an issue with failover on VIP net without DHCP
During a failover event, if the VIP subnet did not have DHCP enabled the failover would fail. The failover flow was not refreshing the amphora data stored in the flow. This caused later tasks in the flow to incorrectly think that there was no vrrp_ip assigned to the amphora. This change adds an amphora refresh task to the flow to make sure the flow data is updated from the database and the vrrp_ip is available. It also corrects a logging message to show the port ID. Change-Id: Ibb9607a8aa14cdcfbaf5eca7b5206c586d22efce Closes-Bug: #1694440 Closes-Bug: #1694426
This commit is contained in:
parent
cba271ccdf
commit
56ab54008c
@ -121,7 +121,7 @@ class HaproxyAmphoraLoadBalancerDriver(
|
||||
|
||||
port = amphorae_network_config.get(amphora.id).vrrp_port
|
||||
LOG.debug("Post-VIP-Plugging with vrrp_ip %s vrrp_port %s",
|
||||
amphora.vrrp_ip, port)
|
||||
amphora.vrrp_ip, port.id)
|
||||
host_routes = [{'nexthop': hr.nexthop,
|
||||
'destination': hr.destination}
|
||||
for hr in subnet.host_routes]
|
||||
|
@ -337,10 +337,16 @@ class AmphoraFlows(object):
|
||||
failover_amphora_flow.add(database_tasks.UpdateAmpFailoverDetails(
|
||||
requires=(constants.AMPHORA, constants.AMP_DATA)))
|
||||
|
||||
# Update the data stored in the flow from the database
|
||||
failover_amphora_flow.add(database_tasks.ReloadLoadBalancer(
|
||||
requires=constants.LOADBALANCER_ID,
|
||||
provides=constants.LOADBALANCER))
|
||||
|
||||
failover_amphora_flow.add(database_tasks.ReloadAmphora(
|
||||
requires=constants.AMPHORA_ID,
|
||||
provides=constants.AMPHORA))
|
||||
|
||||
# Prepare to reconnect the network interface(s)
|
||||
failover_amphora_flow.add(network_tasks.GetAmphoraeNetworkConfigs(
|
||||
requires=constants.LOADBALANCER,
|
||||
provides=constants.AMPHORAE_NETWORK_CONFIG))
|
||||
|
Loading…
Reference in New Issue
Block a user