Adding upgrade action and associated configs & unit tests to cinder charm.

This commit is contained in:
David Della Vecchia 2015-08-26 17:13:22 +00:00
parent 5e60b58ffe
commit 7f982009e8
3 changed files with 13 additions and 2 deletions

View File

@ -1,2 +1,4 @@
git-reinstall:
description: Reinstall cinder from the openstack-origin-git repositories.
openstack-upgrade:
description: Perform openstack upgrades. Config option action-managed-upgrade must be set to True.

View File

@ -282,4 +282,13 @@ options:
description: |
A comma-separated list of nagios servicegroups.
If left empty, the nagios_context will be used as the servicegroup
action-managed-upgrade:
default: False
type: boolean
description: |
If True enables openstack upgrades for this charm via juju actions.
You will still need to set the config variable for the openstack version
but instead of an upgrade running automatically across all units, it will
wait for you to execute the openstack-upgrade action for this charm on each
unit. If False it will revert to existing behavior of upgrading all units on
config change.

View File

@ -141,7 +141,7 @@ def config_changed():
if git_install_requested():
if config_value_changed('openstack-origin-git'):
git_install(config('openstack-origin-git'))
else:
elif not config('action-managed-upgrade'):
if openstack_upgrade_available('cinder-common'):
do_openstack_upgrade(configs=CONFIGS)
# NOTE(jamespage) tell any storage-backends we just upgraded