From a2a9b54e536d7e14d76473da765fe5433e247752 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Wed, 14 Oct 2015 14:08:38 +0000 Subject: [PATCH] Refresh configs after upgrade to ensure the correct templates are used --- hooks/nova_compute_hooks.py | 2 ++ hooks/nova_compute_utils.py | 3 ++- templates/juno/nova.conf | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hooks/nova_compute_hooks.py b/hooks/nova_compute_hooks.py index 07efef49..2eb5702f 100755 --- a/hooks/nova_compute_hooks.py +++ b/hooks/nova_compute_hooks.py @@ -121,6 +121,8 @@ def config_changed(): if openstack_upgrade_available('nova-common'): status_set('maintenance', 'Running openstack upgrade') do_openstack_upgrade(CONFIGS) + # Refresh configs templates as os release has changed + CONFIGS = register_configs() sysctl_dict = config('sysctl') if sysctl_dict: diff --git a/hooks/nova_compute_utils.py b/hooks/nova_compute_utils.py index 2f2bea9f..8bf6ad96 100644 --- a/hooks/nova_compute_utils.py +++ b/hooks/nova_compute_utils.py @@ -557,7 +557,8 @@ def do_openstack_upgrade(configs): apt_install(determine_packages(), fatal=True) # Regenerate configs in full for new release - configs.write_all() + new_configs = register_configs() + new_configs.write_all() [service_restart(s) for s in services()] diff --git a/templates/juno/nova.conf b/templates/juno/nova.conf index f1725f32..5248fa68 100644 --- a/templates/juno/nova.conf +++ b/templates/juno/nova.conf @@ -1,4 +1,4 @@ -# havana +# juno ############################################################################### # [ WARNING ] # Configuration file maintained by Juju. Local changes may be overwritten.