Run identity client relations when db is complete
When keystone is deployed with multiple units but without hacluster one off scenarios occur where one non-leader unit will fail to update its client relations. This change runs all identity client relations when the database relation is complete thus guaranteeing all keystone units update there identity relation data with clients. Small timing fix to amulet tests. Closes-Bug: #1761562 Change-Id: I338e500dbc155b75c75b9261a9b5b471bd73088a
This commit is contained in:
parent
a189c3da80
commit
a240c520a5
|
@ -422,6 +422,7 @@ def db_changed():
|
|||
if CompareOpenStackReleases(
|
||||
os_release('keystone-common')) >= 'liberty':
|
||||
CONFIGS.write(POLICY_JSON)
|
||||
update_all_identity_relation_units()
|
||||
|
||||
|
||||
@hooks.hook('identity-service-relation-changed')
|
||||
|
|
|
@ -905,6 +905,7 @@ class KeystoneBasicDeployment(OpenStackAmuletDeployment):
|
|||
amulet.raise_status(amulet.FAIL, msg=msg)
|
||||
|
||||
self.d.configure(juju_service, set_default)
|
||||
self._auto_wait_for_status(exclude_services=self.exclude_services)
|
||||
|
||||
u.log.debug('OK')
|
||||
|
||||
|
|
|
@ -210,7 +210,8 @@ class KeystoneRelationTests(CharmTestCase):
|
|||
'shared-db relation incomplete. Peer not ready?'
|
||||
)
|
||||
|
||||
def _shared_db_test(self, configs, unit_name):
|
||||
@patch.object(hooks, 'update_all_identity_relation_units')
|
||||
def _shared_db_test(self, configs, unit_name, mock_update_all):
|
||||
self.relation_get.return_value = 'keystone/0 keystone/3'
|
||||
self.local_unit.return_value = unit_name
|
||||
configs.complete_contexts = MagicMock()
|
||||
|
|
Loading…
Reference in New Issue