Series Upgrade
Implement the series-upgrade feature allowing to move between Ubuntu series. Change-Id: Iccab9ef5c129993c9599bf8c54b685ed7f73e659
This commit is contained in:
parent
e3724c2079
commit
2206d4a275
|
@ -46,6 +46,10 @@ from charmhelpers.core.host import (
|
||||||
from charmhelpers.contrib.openstack.utils import (
|
from charmhelpers.contrib.openstack.utils import (
|
||||||
set_os_workload_status,
|
set_os_workload_status,
|
||||||
os_application_version_set,
|
os_application_version_set,
|
||||||
|
set_unit_paused,
|
||||||
|
set_unit_upgrading,
|
||||||
|
clear_unit_paused,
|
||||||
|
clear_unit_upgrading,
|
||||||
)
|
)
|
||||||
from charmhelpers.contrib.storage.linux.ceph import (
|
from charmhelpers.contrib.storage.linux.ceph import (
|
||||||
delete_keyring,
|
delete_keyring,
|
||||||
|
@ -161,6 +165,26 @@ def upgrade_charm():
|
||||||
backup_backend_joined(rid)
|
backup_backend_joined(rid)
|
||||||
|
|
||||||
|
|
||||||
|
@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__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
hooks.execute(sys.argv)
|
hooks.execute(sys.argv)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
cinder_backup_hooks.py
|
|
@ -0,0 +1 @@
|
||||||
|
cinder_backup_hooks.py
|
Loading…
Reference in New Issue