Merge "Fix failover when using SRIOV VIP" into stable/2024.1
This commit is contained in:
commit
0782c68b71
@ -404,7 +404,7 @@ class AmphoraFlows(object):
|
||||
def get_amphora_for_lb_failover_subflow(
|
||||
self, prefix, role=constants.ROLE_STANDALONE,
|
||||
failed_amp_vrrp_port_id=None, is_vrrp_ipv6=False,
|
||||
flavor_dict=None):
|
||||
flavor_dict=None, timeout_dict=None):
|
||||
"""Creates a new amphora that will be used in a failover flow.
|
||||
|
||||
:requires: loadbalancer_id, flavor, vip, vip_sg_id, loadbalancer
|
||||
@ -488,13 +488,24 @@ class AmphoraFlows(object):
|
||||
rebind={constants.AMPHORAE: constants.NEW_AMPHORAE},
|
||||
provides=constants.AMPHORA_FIREWALL_RULES,
|
||||
inject={constants.AMPHORA_INDEX: 0}))
|
||||
amp_for_failover_flow.add(
|
||||
amphora_driver_tasks.AmphoraeGetConnectivityStatus(
|
||||
name=(prefix + '-' +
|
||||
constants.AMPHORAE_GET_CONNECTIVITY_STATUS),
|
||||
requires=constants.AMPHORAE,
|
||||
rebind={constants.AMPHORAE: constants.NEW_AMPHORAE},
|
||||
inject={constants.TIMEOUT_DICT: timeout_dict,
|
||||
constants.NEW_AMPHORA_ID: constants.NIL_UUID},
|
||||
provides=constants.AMPHORAE_STATUS))
|
||||
amp_for_failover_flow.add(
|
||||
amphora_driver_tasks.SetAmphoraFirewallRules(
|
||||
name=prefix + '-' + constants.SET_AMPHORA_FIREWALL_RULES,
|
||||
requires=(constants.AMPHORAE,
|
||||
constants.AMPHORA_FIREWALL_RULES),
|
||||
constants.AMPHORA_FIREWALL_RULES,
|
||||
constants.AMPHORAE_STATUS),
|
||||
rebind={constants.AMPHORAE: constants.NEW_AMPHORAE},
|
||||
inject={constants.AMPHORA_INDEX: 0}))
|
||||
inject={constants.AMPHORA_INDEX: 0,
|
||||
constants.TIMEOUT_DICT: timeout_dict}))
|
||||
|
||||
# Plug member ports
|
||||
amp_for_failover_flow.add(network_tasks.CalculateAmphoraDelta(
|
||||
|
@ -344,7 +344,6 @@ class TestLoadBalancerFlows(base.TestCase):
|
||||
self.assertIn(constants.FLAVOR, failover_flow.requires)
|
||||
self.assertIn(constants.LOADBALANCER, failover_flow.requires)
|
||||
self.assertIn(constants.LOADBALANCER_ID, failover_flow.requires)
|
||||
self.assertIn(constants.AMPHORAE_STATUS, failover_flow.requires)
|
||||
|
||||
self.assertIn(constants.UPDATED_PORTS, failover_flow.provides)
|
||||
self.assertIn(constants.AMPHORA, failover_flow.provides)
|
||||
@ -364,9 +363,9 @@ class TestLoadBalancerFlows(base.TestCase):
|
||||
self.assertIn(constants.SUBNET, failover_flow.provides)
|
||||
self.assertIn(constants.NEW_AMPHORAE, failover_flow.provides)
|
||||
|
||||
self.assertEqual(7, len(failover_flow.requires),
|
||||
self.assertEqual(6, len(failover_flow.requires),
|
||||
failover_flow.requires)
|
||||
self.assertEqual(16, len(failover_flow.provides),
|
||||
self.assertEqual(17, len(failover_flow.provides),
|
||||
failover_flow.provides)
|
||||
|
||||
@mock.patch('octavia.common.rpc.NOTIFIER',
|
||||
@ -424,7 +423,6 @@ class TestLoadBalancerFlows(base.TestCase):
|
||||
self.assertIn(constants.FLAVOR, failover_flow.requires)
|
||||
self.assertIn(constants.LOADBALANCER, failover_flow.requires)
|
||||
self.assertIn(constants.LOADBALANCER_ID, failover_flow.requires)
|
||||
self.assertIn(constants.AMPHORAE_STATUS, failover_flow.requires)
|
||||
|
||||
self.assertIn(constants.UPDATED_PORTS, failover_flow.provides)
|
||||
self.assertIn(constants.AMPHORA, failover_flow.provides)
|
||||
@ -445,9 +443,9 @@ class TestLoadBalancerFlows(base.TestCase):
|
||||
self.assertIn(constants.SUBNET, failover_flow.provides)
|
||||
self.assertIn(constants.NEW_AMPHORAE, failover_flow.provides)
|
||||
|
||||
self.assertEqual(7, len(failover_flow.requires),
|
||||
self.assertEqual(6, len(failover_flow.requires),
|
||||
failover_flow.requires)
|
||||
self.assertEqual(16, len(failover_flow.provides),
|
||||
self.assertEqual(17, len(failover_flow.provides),
|
||||
failover_flow.provides)
|
||||
|
||||
@mock.patch('octavia.common.rpc.NOTIFIER',
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed an issue when failing over load balancers using SR-IOV VIP ports.
|
Loading…
Reference in New Issue
Block a user