Enable registration of packages with principal charm

For principal - subordinate plugin type relations where the
principal Python payload imports code from packages managed by a
subordinate, upgrades can be problematic.

This change will allow a subordinate charm that have opted into the
feature to inform its principal about all implemented release -
packages combinations ahead of time. With this information in place
the principal can do the upgrade in one operation without risk of
charm relation RPC type processing at a critical moment.

Depends-On: https://review.opendev.org/c/openstack/charms.openstack/+/781487
Depends-On: https://review.opendev.org/c/openstack/charm-layer-openstack/+/781624
Depends-On: https://review.opendev.org/c/openstack/charm-interface-keystone-domain-backend/+/781658
Closes-Bug: #1806111
Change-Id: Ib3239690286dc902eb247edec96b8dca7bf5bee4
This commit is contained in:
Frode Nordahl 2021-03-19 17:44:47 +01:00
parent 41b55bd2fe
commit c9fa02a6d5
No known key found for this signature in database
GPG Key ID: 6A5D59A3BA48373F
2 changed files with 6 additions and 2 deletions

View File

@ -25,7 +25,9 @@ import charmhelpers.core.hookenv as hookenv
charm.use_defaults(
'charm.installed',
'update-status')
'update-status',
'upgrade-charm',
)
# if config has been changed we need to re-evaluate flags
# config.changed is set and cleared (atexit) in layer-basic

View File

@ -24,7 +24,9 @@ class TestRegisteredHooks(test_utils.TestRegisteredHooks):
def test_hooks(self):
defaults = [
'charm.installed',
'update-status']
'update-status',
'upgrade-charm',
]
hook_set = {
'when': {
'configure_domain_name': ('domain-backend.connected',