refactoring do_openstack_upgrade to accept configs argument, bringing it in line with the other openstack charms
This commit is contained in:
parent
4c82e947f5
commit
2e971f0ac8
@ -23,7 +23,7 @@ def openstack_upgrade():
|
||||
code to run, otherwise a full service level upgrade will fire
|
||||
on config-changed."""
|
||||
|
||||
if (do_action_openstack_upgrade('nova_compute-common',
|
||||
if (do_action_openstack_upgrade('nova-common',
|
||||
do_openstack_upgrade,
|
||||
CONFIGS)):
|
||||
config_changed()
|
||||
|
@ -108,7 +108,7 @@ def config_changed():
|
||||
git_install(config('openstack-origin-git'))
|
||||
elif not config('action-managed-upgrade'):
|
||||
if openstack_upgrade_available('nova-common'):
|
||||
CONFIGS = do_openstack_upgrade()
|
||||
do_openstack_upgrade(CONFIGS)
|
||||
|
||||
sysctl_dict = config('sysctl')
|
||||
if sysctl_dict:
|
||||
|
@ -523,7 +523,7 @@ def import_authorized_keys(user='root', prefix=None):
|
||||
_keys.write('{}\n'.format(authorized_keys[index]))
|
||||
|
||||
|
||||
def do_openstack_upgrade():
|
||||
def do_openstack_upgrade(configs):
|
||||
# NOTE(jamespage) horrible hack to make utils forget a cached value
|
||||
import charmhelpers.contrib.openstack.utils as utils
|
||||
utils.os_rel = None
|
||||
@ -543,10 +543,8 @@ def do_openstack_upgrade():
|
||||
apt_install(determine_packages(), fatal=True)
|
||||
|
||||
# Regenerate configs in full for new release
|
||||
configs = register_configs()
|
||||
configs.write_all()
|
||||
[service_restart(s) for s in services()]
|
||||
return configs
|
||||
|
||||
|
||||
def import_keystone_ca_cert():
|
||||
|
Loading…
Reference in New Issue
Block a user