From 90888b24777aa5dadcdc3b9055d80447b1c02118 Mon Sep 17 00:00:00 2001 From: James Page Date: Mon, 3 Mar 2014 09:13:00 +0000 Subject: [PATCH] Restart on change and write_all configs for all ha_changed hooked executions --- hooks/keystone_hooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/keystone_hooks.py b/hooks/keystone_hooks.py index f84010c0..1599e36d 100755 --- a/hooks/keystone_hooks.py +++ b/hooks/keystone_hooks.py @@ -181,12 +181,13 @@ def ha_joined(): @hooks.hook('ha-relation-changed') +@restart_on_change(restart_map()) def ha_changed(): clustered = relation_get('clustered') + CONFIGS.write_all() if (clustered is not None and is_leader(CLUSTER_RES)): ensure_initial_admin(config) - CONFIGS.write_all() log('Cluster configured, notifying other services and updating ' 'keystone endpoint configuration') for rid in relation_ids('identity-service'):