Replace post-upgrade-configuration with update-trilio

After rereading the request from Trilio I realised that the action
should be performing the package update too. So this PR removes the
post-upgrade-configuration action and replaces it with update-trilio
which performs the package upgrades too.

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/616
Change-Id: Ia2c88560b45bdb20742e254464730b5708f8b79f
This commit is contained in:
Liam Young 2021-08-05 07:40:21 +00:00
parent 227a619103
commit 6b9b148006
3 changed files with 11 additions and 9 deletions

View File

@ -16,8 +16,7 @@ ghost-share:
description: Comma separated nfs-shares configuration option from secondary deployment. NFS shares must be provided in the same order as the nfs-shares configuration option for the local deployment.
required:
- nfs-shares
post-upgrade-configuration:
update-trilio:
description: |
If the Trilio packages were upgraded outside of the charms control then run
this action to rerender configuration files and run any upgrade tasks such
as database migrations.
Update the trilio packages and run post-update steps such as rerender
configuration files and run any upgrade tasks such as database migrations.

View File

@ -66,13 +66,15 @@ def ghost_share(*args):
trilio_wlm_charm._assess_status()
def post_upgrade_configuration(*args):
def update_trilio(*args):
"""Run setup after Trilio upgrade.
"""
with charms_openstack.charm.provide_charm_instance() as trilio_wlm_charm:
trilio_wlm_charm.render_all_configs()
if hookenv.is_leader():
trilio_wlm_charm.do_trilio_upgrade_db_migration()
interfaces = ["shared-db", "identity-service", "amqp"]
endpoints = [
reactive.relations.endpoint_from_flag("{}.available".format(i))
for i in interfaces]
trilio_wlm_charm.run_trilio_upgrade(endpoints)
trilio_wlm_charm._assess_status()
@ -82,7 +84,7 @@ ACTIONS = {
"create-cloud-admin-trust": create_cloud_admin_trust,
"create-license": create_license,
"ghost-share": ghost_share,
"post-upgrade-configuration": post_upgrade_configuration,
"update-trilio": update_trilio,
}

1
src/actions/update-trilio Symbolic link
View File

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