Refactor policy synchronizer
This commit adds the following 1. Move policy and rule synchronizer to new class from policy engine 2. support sync of single datasource policy 3. Expose synchronizer endpoints via PE to listen to broadcast requests for synchronization 4. update the functions to synchronize one policy instead looping through all policies everytime. Partially-Implements blueprint refactor-synchronizer Change-Id: I0fc4822daf6c49e6885471530a072caa03ce492b
This commit is contained in:
parent
99d2a259b2
commit
0bded420c5
|
@ -246,13 +246,13 @@ class TestHA(manager_congress.ScenarioPolicyBase):
|
|||
if not test.call_until_true(
|
||||
func=lambda: self._check_resource_exists(
|
||||
self.client, 'datasource'),
|
||||
duration=60, sleep_for=1):
|
||||
duration=90, sleep_for=1):
|
||||
raise exceptions.TimeoutException(
|
||||
"primary doesn't have fake dataservice, data sync failed")
|
||||
if not test.call_until_true(
|
||||
func=lambda: self._check_resource_exists(
|
||||
self.client, 'policy'),
|
||||
duration=60, sleep_for=1):
|
||||
duration=90, sleep_for=1):
|
||||
raise exceptions.TimeoutException(
|
||||
"primary doesn't have fake policy, policy sync failed")
|
||||
|
||||
|
@ -280,13 +280,13 @@ class TestHA(manager_congress.ScenarioPolicyBase):
|
|||
if not test.call_until_true(
|
||||
func=lambda: self._check_resource_missing(
|
||||
self.client, 'datasource'),
|
||||
duration=60, sleep_for=1):
|
||||
duration=90, sleep_for=1):
|
||||
raise exceptions.TimeoutException(
|
||||
"primary still has fake dataservice, sync failed")
|
||||
if not test.call_until_true(
|
||||
func=lambda: self._check_resource_missing(
|
||||
self.client, 'policy'),
|
||||
duration=60, sleep_for=1):
|
||||
duration=90, sleep_for=1):
|
||||
raise exceptions.TimeoutException(
|
||||
"primary still fake policy, policy synchronizer failed")
|
||||
|
||||
|
|
Loading…
Reference in New Issue