charm-nova-cloud-controller/unit_tests
Felipe Reyes d09ed28af0 Update nova relations data on ha-relation-changed
When taking the nova-cloud-controller from single unit to full HA by
increasing the number of units from 1 to 3 and relating it to hacluster,
the data set on the cloud-compute relation is not updated, because the
update_nova_relation() function is only called on
cloud-compute-relation-joined and config-changed, none of these hooks
are executed when scaling out the application.

This patch introduces a call to update_nova_relation() on
ha-relation-changed.

Test case on an environment deployed with a single unit of
nova-cloud-controller:

    export NOVA_CC_VIP=10.0.0.11
    juju config nova-cloud-controller vip=$NOVA_CC_VIP
    juju deploy --series jammy --channel 2.4/stable hacluster \
        nova-cloud-controller-hacluster
    juju add-unit -n 2 nova-cloud-controller
    juju deploy --series jammy memcached
    juju add-relation memcached nova-cloud-controller
    juju add-relation nova-cloud-controller nova-cloud-controller-hacluster

Change-Id: Ib08bf9b6e1ce2b69be4d99ffe0726b59d81f4bc9
Closes-Bug: #2002154
2023-04-26 17:13:03 +00:00
..
__init__.py Backport fixes 2023-03-31 14:21:57 +00:00
test_actions.py Backport fixes 2023-03-31 14:21:57 +00:00
test_actions_openstack_upgrade.py Backport fixes 2023-03-31 14:21:57 +00:00
test_nova_cc_contexts.py Backport fixes 2023-03-31 14:21:57 +00:00
test_nova_cc_hooks.py Update nova relations data on ha-relation-changed 2023-04-26 17:13:03 +00:00
test_nova_cc_utils.py Backport fixes 2023-03-31 14:21:57 +00:00
test_utils.py Backport fixes 2023-03-31 14:21:57 +00:00