Gate initial update of relations on having reached expected scale
At present the Keystone charm frequently initiates updates to its relations before it has reached a stable state. Make use information from ``juju goal-state`` to predict scale and gate initial update of relations on having reached expected scale. Depends-On: https://github.com/juju/charm-helpers/pull/226 Change-Id: I96d4aff7c4ec9fb9ea160c7e294581bab3103df8
This commit is contained in:
@@ -104,6 +104,7 @@ from keystone_utils import (
|
||||
send_notifications,
|
||||
is_db_ready,
|
||||
is_db_initialised,
|
||||
is_expected_scale,
|
||||
filter_null,
|
||||
is_service_present,
|
||||
delete_service_entry,
|
||||
@@ -310,6 +311,10 @@ def update_all_identity_relation_units(check_db_ready=True):
|
||||
log("Database not yet initialised - deferring identity-relation "
|
||||
"updates", level=INFO)
|
||||
return
|
||||
if not is_expected_scale():
|
||||
log("Keystone charm and it's dependencies not yet at expected scale "
|
||||
"- deferring identity-relation updates", level=INFO)
|
||||
return
|
||||
|
||||
log('Firing identity_changed hook for all related services.')
|
||||
for rid in relation_ids('identity-service'):
|
||||
|
||||
Reference in New Issue
Block a user