Merge "Fix timeout duration in start_vrrp_service during failovers" into stable/xena
This commit is contained in:
commit
1106d3fd86
@ -96,7 +96,8 @@ class KeepalivedAmphoraDriverMixin(driver_base.VRRPDriverMixin):
|
|||||||
|
|
||||||
LOG.info("Start amphora %s VRRP Service.", amphora.id)
|
LOG.info("Start amphora %s VRRP Service.", amphora.id)
|
||||||
|
|
||||||
self._populate_amphora_api_version(amphora)
|
self._populate_amphora_api_version(amphora,
|
||||||
|
timeout_dict=timeout_dict)
|
||||||
self.clients[amphora.api_version].start_vrrp(amphora,
|
self.clients[amphora.api_version].start_vrrp(amphora,
|
||||||
timeout_dict=timeout_dict)
|
timeout_dict=timeout_dict)
|
||||||
|
|
||||||
|
@ -100,6 +100,9 @@ class TestVRRPRestDriver(base.TestCase):
|
|||||||
|
|
||||||
self.keepalived_mixin.start_vrrp_service(self.amphora_mock)
|
self.keepalived_mixin.start_vrrp_service(self.amphora_mock)
|
||||||
|
|
||||||
|
populate_mock = self.keepalived_mixin._populate_amphora_api_version
|
||||||
|
populate_mock.assert_called_once_with(self.amphora_mock,
|
||||||
|
timeout_dict=None)
|
||||||
self.clients[API_VERSION].start_vrrp.assert_called_once_with(
|
self.clients[API_VERSION].start_vrrp.assert_called_once_with(
|
||||||
self.amphora_mock, timeout_dict=None)
|
self.amphora_mock, timeout_dict=None)
|
||||||
|
|
||||||
@ -114,6 +117,20 @@ class TestVRRPRestDriver(base.TestCase):
|
|||||||
|
|
||||||
self.clients[API_VERSION].start_vrrp.assert_not_called()
|
self.clients[API_VERSION].start_vrrp.assert_not_called()
|
||||||
|
|
||||||
|
# With timeout_dict
|
||||||
|
self.clients[API_VERSION].start_vrrp.reset_mock()
|
||||||
|
populate_mock.reset_mock()
|
||||||
|
|
||||||
|
timeout_dict = mock.Mock()
|
||||||
|
self.keepalived_mixin.start_vrrp_service(self.amphora_mock,
|
||||||
|
timeout_dict=timeout_dict)
|
||||||
|
|
||||||
|
populate_mock = self.keepalived_mixin._populate_amphora_api_version
|
||||||
|
populate_mock.assert_called_once_with(self.amphora_mock,
|
||||||
|
timeout_dict=timeout_dict)
|
||||||
|
self.clients[API_VERSION].start_vrrp.assert_called_once_with(
|
||||||
|
self.amphora_mock, timeout_dict=timeout_dict)
|
||||||
|
|
||||||
def test_reload_vrrp_service(self):
|
def test_reload_vrrp_service(self):
|
||||||
|
|
||||||
self.keepalived_mixin.reload_vrrp_service(self.lb_mock)
|
self.keepalived_mixin.reload_vrrp_service(self.lb_mock)
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixed a too long timeout when attempting to start the VRRP service in an
|
||||||
|
unreachable amphora during a failover. A specific shorter timeout should be
|
||||||
|
used during the failovers.
|
Loading…
Reference in New Issue
Block a user