From a8a332f8c88fd059403146fca70cd14997611efa Mon Sep 17 00:00:00 2001 From: David Della Vecchia Date: Mon, 19 Oct 2015 20:52:06 +0000 Subject: [PATCH] reordering function calls to avoid race condition --- hooks/keystone_hooks.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hooks/keystone_hooks.py b/hooks/keystone_hooks.py index 72927c31..83f4775d 100755 --- a/hooks/keystone_hooks.py +++ b/hooks/keystone_hooks.py @@ -121,10 +121,6 @@ def install(): status_set('maintenance', 'Executing pre-install') execd_preinstall() configure_installation_source(config('openstack-origin')) - - unison.ensure_user(user=SSH_USER, group='juju_keystone') - unison.ensure_user(user=SSH_USER, group='keystone') - status_set('maintenance', 'Installing apt packages') apt_update() apt_install(determine_packages(), fatal=True) @@ -132,6 +128,9 @@ def install(): status_set('maintenance', 'Git install') git_install(config('openstack-origin-git')) + unison.ensure_user(user=SSH_USER, group='juju_keystone') + unison.ensure_user(user=SSH_USER, group='keystone') + @hooks.hook('config-changed') @restart_on_change(restart_map())