Charm needs to install memcached on upgrade-charm

The ceilometer-agent charm recognizes it needs memecached with
enable_memcached() but never installs the package when upgrading
from previous versions of the charm.

Add the call to install packages in upgrade_charm().

Change-Id: I393eb682e0a44b54712e2bb35fc983af16c0c379
Partial-bug: #1665392
This commit is contained in:
David Ames 2017-02-16 11:17:53 -08:00
parent 89893e2c5a
commit bde0fcef7e
1 changed files with 8 additions and 2 deletions

View File

@ -73,8 +73,7 @@ def nova_ceilometer_joined():
relation_set(subordinate_configuration=json.dumps(NOVA_SETTINGS))
@hooks.hook("ceilometer-service-relation-changed",
"upgrade-charm")
@hooks.hook("ceilometer-service-relation-changed")
@restart_on_change(restart_map())
def ceilometer_changed():
CONFIGS.write_all()
@ -82,6 +81,13 @@ def ceilometer_changed():
update_nrpe_config()
@hooks.hook("upgrade-charm")
def upgrade_charm():
apt_install(
filter_installed_packages(get_packages()),
fatal=True)
@hooks.hook('config-changed')
@restart_on_change(restart_map(), stopstart=True)
def config_changed():