Restart on change and write_all configs for all ha_changed hooked executions
This commit is contained in:
parent
f258309df2
commit
90888b2477
@ -181,12 +181,13 @@ def ha_joined():
|
|||||||
|
|
||||||
|
|
||||||
@hooks.hook('ha-relation-changed')
|
@hooks.hook('ha-relation-changed')
|
||||||
|
@restart_on_change(restart_map())
|
||||||
def ha_changed():
|
def ha_changed():
|
||||||
clustered = relation_get('clustered')
|
clustered = relation_get('clustered')
|
||||||
|
CONFIGS.write_all()
|
||||||
if (clustered is not None and
|
if (clustered is not None and
|
||||||
is_leader(CLUSTER_RES)):
|
is_leader(CLUSTER_RES)):
|
||||||
ensure_initial_admin(config)
|
ensure_initial_admin(config)
|
||||||
CONFIGS.write_all()
|
|
||||||
log('Cluster configured, notifying other services and updating '
|
log('Cluster configured, notifying other services and updating '
|
||||||
'keystone endpoint configuration')
|
'keystone endpoint configuration')
|
||||||
for rid in relation_ids('identity-service'):
|
for rid in relation_ids('identity-service'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user