set up changes for option ha-legacy-mode

This commit is contained in:
Hui Xiang 2015-01-09 16:00:15 +08:00
parent 8ff6293816
commit ce1b5a8bf0
2 changed files with 4 additions and 0 deletions

View File

@ -118,7 +118,10 @@ def config_changed():
else:
apt_purge('neutron-l3-agent')
# Setup legacy ha configurations
update_legacy_ha_files()
for r_id in relation_ids('ha'):
ha_relation_joined()
@hooks.hook('upgrade-charm')

View File

@ -649,6 +649,7 @@ def update_legacy_ha_files(force=False):
if config('ha-legacy-mode'):
install_legacy_ha_files(force=force)
else:
delete_legacy_resources()
remove_legacy_ha_files()