Install prerequisite packages on charm upgrade.
When upgrading the charm some package dependancies are missing such as python3-distutils. This patch uses the same approach as the install hook to install packages before calling the the main python hook code. Change-Id: If3bfa6efd5a3924f3ca6d1309f82c3867cfd4c67 Closes-Bug: #1803418
This commit is contained in:
parent
910170bed0
commit
3066151e77
|
@ -17,4 +17,5 @@ for dep in ${DEPS[@]}; do
|
|||
check_and_install ${PYTHON} ${dep}
|
||||
done
|
||||
|
||||
exec ./hooks/install.real
|
||||
real_hook="./hooks/$(basename $0).real"
|
||||
exec $real_hook
|
||||
|
|
|
@ -259,7 +259,7 @@ def install_vaultlocker():
|
|||
apt_install(pkgs, fatal=True)
|
||||
|
||||
|
||||
@hooks.hook('upgrade-charm')
|
||||
@hooks.hook('upgrade-charm.real')
|
||||
@harden()
|
||||
def upgrade_charm():
|
||||
initialize_ufw()
|
||||
|
|
|
@ -1 +1 @@
|
|||
swift_storage_hooks.py
|
||||
install
|
|
@ -0,0 +1 @@
|
|||
swift_storage_hooks.py
|
Loading…
Reference in New Issue