Browse Source

Merge "Fix amphora failover flow in amphorav2 driver" into stable/wallaby

stable/wallaby
Zuul 6 days ago
committed by Gerrit Code Review
parent
commit
62f773c4e7
3 changed files with 13 additions and 16 deletions
  1. +1
    -2
      octavia/controller/worker/v2/controller_worker.py
  2. +7
    -14
      octavia/tests/unit/controller/worker/v2/test_controller_worker.py
  3. +5
    -0
      releasenotes/notes/fix-amphora-failover-amphorav2-b19a76ccfdc75245.yaml

+ 1
- 2
octavia/controller/worker/v2/controller_worker.py View File

@ -945,8 +945,7 @@ class ControllerWorker(object):
constants.LOADBALANCER: provider_lb_dict,
constants.SERVER_GROUP_ID: server_group_id,
constants.LOADBALANCER_ID: lb_id,
constants.VIP: vip_dict,
constants.AMPHORA_ID: amphora_id}
constants.VIP: vip_dict}
self.run_flow(
flow_utils.get_failover_amphora_flow,


+ 7
- 14
octavia/tests/unit/controller/worker/v2/test_controller_worker.py View File

@ -1270,8 +1270,7 @@ class TestControllerWorker(base.TestCase):
constants.LOADBALANCER: mock_provider_lb.to_dict(),
constants.LOADBALANCER_ID: LB_ID,
constants.SERVER_GROUP_ID: None,
constants.VIP: mock_lb.vip.to_dict(),
constants.AMPHORA_ID: AMP_ID}
constants.VIP: mock_lb.vip.to_dict()}
cw = controller_worker.ControllerWorker()
cw.services_controller.reset_mock()
@ -1326,8 +1325,7 @@ class TestControllerWorker(base.TestCase):
constants.LOADBALANCER: mock_provider_lb.to_dict(),
constants.LOADBALANCER_ID: LB_ID,
constants.SERVER_GROUP_ID: None,
constants.VIP: mock_lb.vip.to_dict(),
constants.AMPHORA_ID: AMP_ID}
constants.VIP: mock_lb.vip.to_dict()}
cw = controller_worker.ControllerWorker()
cw.services_controller.reset_mock()
@ -1382,8 +1380,7 @@ class TestControllerWorker(base.TestCase):
constants.LOADBALANCER: mock_provider_lb.to_dict(),
constants.LOADBALANCER_ID: LB_ID,
constants.SERVER_GROUP_ID: SERVER_GROUP_ID,
constants.VIP: mock_lb.vip.to_dict(),
constants.AMPHORA_ID: AMP_ID}
constants.VIP: mock_lb.vip.to_dict()}
cw = controller_worker.ControllerWorker()
cw.services_controller.reset_mock()
@ -1435,8 +1432,7 @@ class TestControllerWorker(base.TestCase):
constants.LOADBALANCER: mock_provider_lb.to_dict(),
constants.LOADBALANCER_ID: LB_ID,
constants.SERVER_GROUP_ID: SERVER_GROUP_ID,
constants.VIP: mock_lb.vip.to_dict(),
constants.AMPHORA_ID: AMP_ID}
constants.VIP: mock_lb.vip.to_dict()}
cw = controller_worker.ControllerWorker()
cw.services_controller.reset_mock()
@ -1492,8 +1488,7 @@ class TestControllerWorker(base.TestCase):
constants.LOADBALANCER: mock_provider_lb.to_dict(),
constants.LOADBALANCER_ID: LB_ID,
constants.SERVER_GROUP_ID: None,
constants.VIP: mock_lb.vip.to_dict(),
constants.AMPHORA_ID: AMP_ID}
constants.VIP: mock_lb.vip.to_dict()}
mock_get_flavor_meta.return_value = {'taste': 'spicy'}
cw = controller_worker.ControllerWorker()
@ -1549,8 +1544,7 @@ class TestControllerWorker(base.TestCase):
constants.LOADBALANCER: mock_provider_lb.to_dict(),
constants.LOADBALANCER_ID: LB_ID,
constants.SERVER_GROUP_ID: None,
constants.VIP: mock_lb.vip.to_dict(),
constants.AMPHORA_ID: AMP_ID}
constants.VIP: mock_lb.vip.to_dict()}
mock_get_az_meta.return_value = {'planet': 'jupiter'}
cw = controller_worker.ControllerWorker()
@ -1666,8 +1660,7 @@ class TestControllerWorker(base.TestCase):
constants.LOADBALANCER: None,
constants.LOADBALANCER_ID: None,
constants.SERVER_GROUP_ID: None,
constants.VIP: {},
constants.AMPHORA_ID: AMP_ID}
constants.VIP: {}}
cw = controller_worker.ControllerWorker()
cw.services_controller.reset_mock()


+ 5
- 0
releasenotes/notes/fix-amphora-failover-amphorav2-b19a76ccfdc75245.yaml View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fix an issue with amphorav2 driver, a failover of an amphora created an
amphora with an ERROR status.

Loading…
Cancel
Save