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 :rtype: None
""" """
_primary = self.get_cluster_primary_address(nocache=True) _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 = ( _script = (
"shell.connect('{user}:{pw}@{caddr}')\n" "shell.connect('{user}:{pw}@{caddr}')\n"
"cluster = dba.get_cluster('{name}')\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('endpoint.cluster.changed.unit-configure-ready')
@reactive.when('leadership.set.cluster-instances-clustered') @reactive.when('leadership.set.cluster-instances-clustered')
@reactive.when('leadership.is_leader') @reactive.when('leadership.is_leader')
@reactive.when('cluster.available')
def scale_out(): def scale_out():
"""Handle scale-out adding new nodes to an existing cluster.""" """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.mysql.tests.MySQLInnoDBClusterScaleTest
- zaza.openstack.charm_tests.keystone.tests.AuthenticationAuthorizationTest - zaza.openstack.charm_tests.keystone.tests.AuthenticationAuthorizationTest
gate_bundles: gate_bundles:
- scale_in_out: groovy
- full_model: groovy-full-ha - full_model: groovy-full-ha
- scale_in_out: focal
- full_model: focal-full-ha - full_model: focal-full-ha
smoke_bundles: smoke_bundles:
- focal - focal
dev_bundles: dev_bundles:
- scale_in_out: groovy
- scale_in_out: focal
tests_options: tests_options:
force_deploy: force_deploy:
- groovy - groovy

View File

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