Re-enable scale in scale out test

Add the cluster.available flag to the scale_out handler.

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/499
Change-Id: Ibc76b03de99af32e7f9d8e2ace702d96d75d6a5b
This commit is contained in:
David Ames 2021-02-06 09:47:12 -08:00
parent 19aa620069
commit 638d97ddf3
4 changed files with 6 additions and 4 deletions

View File

@ -847,7 +847,7 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
:rtype: None
"""
_primary = self.get_cluster_primary_address(nocache=True)
ch_core.hookenv.log("Rejoin instance: {}.".format(address))
ch_core.hookenv.log("Remove instance: {}.".format(address))
_script = (
"shell.connect('{user}:{pw}@{caddr}')\n"
"cluster = dba.get_cluster('{name}')\n"

View File

@ -291,6 +291,7 @@ def db_router_respond():
@reactive.when('endpoint.cluster.changed.unit-configure-ready')
@reactive.when('leadership.set.cluster-instances-clustered')
@reactive.when('leadership.is_leader')
@reactive.when('cluster.available')
def scale_out():
"""Handle scale-out adding new nodes to an existing cluster."""

View File

@ -23,13 +23,13 @@ tests:
- zaza.openstack.charm_tests.mysql.tests.MySQLInnoDBClusterScaleTest
- zaza.openstack.charm_tests.keystone.tests.AuthenticationAuthorizationTest
gate_bundles:
- scale_in_out: groovy
- full_model: groovy-full-ha
- scale_in_out: focal
- full_model: focal-full-ha
smoke_bundles:
- focal
dev_bundles:
- scale_in_out: groovy
- scale_in_out: focal
tests_options:
force_deploy:
- groovy

View File

@ -66,7 +66,8 @@ class TestRegisteredHooks(test_utils.TestRegisteredHooks):
"scale_out": (
"endpoint.cluster.changed.unit-configure-ready",
"leadership.set.cluster-instances-clustered",
"leadership.is_leader",),
"leadership.is_leader",
"cluster.available",),
"request_certificates": (
"certificates.available",
"cluster.available",),