Series Upgrade

Implement the series-upgrade feature allowing to move between Ubuntu
series.

Change-Id: Ib101bcc6055ebec230d202383e9aa82535dc0533
This commit is contained in:
David Ames 2018-09-21 07:04:32 +00:00
parent c0d4b93ebc
commit ea09a8bee6
3 changed files with 26 additions and 0 deletions

View File

@ -59,6 +59,10 @@ from charmhelpers.payload.execd import execd_preinstall
from charmhelpers.contrib.openstack.utils import (
set_os_workload_status,
os_application_version_set,
set_unit_paused,
set_unit_upgrading,
clear_unit_paused,
clear_unit_upgrading,
)
@ -219,6 +223,26 @@ def ceph_access_joined(relation_id=None):
)
@hooks.hook('pre-series-upgrade')
def pre_series_upgrade():
log("Running prepare series upgrade hook", "INFO")
# In order to indicate the step of the series upgrade process for
# administrators and automated scripts, the charm sets the paused and
# upgrading states.
set_unit_paused()
set_unit_upgrading()
@hooks.hook('post-series-upgrade')
def post_series_upgrade():
log("Running complete series upgrade hook", "INFO")
# In order to indicate the step of the series upgrade process for
# administrators and automated scripts, the charm clears the paused and
# upgrading states.
clear_unit_paused()
clear_unit_upgrading()
if __name__ == '__main__':
try:
hooks.execute(sys.argv)

1
hooks/post-series-upgrade Symbolic link
View File

@ -0,0 +1 @@
cinder_hooks.py

1
hooks/pre-series-upgrade Symbolic link
View File

@ -0,0 +1 @@
cinder_hooks.py