From 9511aae4a69daf5f5a29c01bcd73b15bcb6b8f12 Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Fri, 11 Oct 2024 12:33:55 +0200 Subject: [PATCH] tempest: Deduce min_compute_nodes from Juju model. At present this value is hard coded, which may cause test failures on deployment with different number of compute nodes. Signed-off-by: Frode Nordahl --- zaza/openstack/charm_tests/tempest/templates/tempest_v3.j2 | 2 +- zaza/openstack/charm_tests/tempest/utils.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/tempest/templates/tempest_v3.j2 b/zaza/openstack/charm_tests/tempest/templates/tempest_v3.j2 index a313f4c61..66eefcb09 100644 --- a/zaza/openstack/charm_tests/tempest/templates/tempest_v3.j2 +++ b/zaza/openstack/charm_tests/tempest/templates/tempest_v3.j2 @@ -25,7 +25,7 @@ image_ref = {{ image_id }} image_ref_alt = {{ image_alt_id }} flavor_ref = {{ flavor_ref }} flavor_ref_alt = {{ flavor_ref_alt }} -min_compute_nodes = 3 +min_compute_nodes = {{ min_compute_nodes }} # TODO: review this as its release specific # min_microversion = 2.2 diff --git a/zaza/openstack/charm_tests/tempest/utils.py b/zaza/openstack/charm_tests/tempest/utils.py index b30f187bc..d7278eb5d 100644 --- a/zaza/openstack/charm_tests/tempest/utils.py +++ b/zaza/openstack/charm_tests/tempest/utils.py @@ -241,6 +241,7 @@ def _add_nova_config(ctxt, keystone_session, missing_fatal=True): ctxt['flavor_ref'] = flavor.id if flavor.name == TEMPEST_ALT_FLAVOR_NAME: ctxt['flavor_ref_alt'] = flavor.id + ctxt['min_compute_nodes'] = len(model.get_units('nova-compute')) def _add_neutron_config(ctxt, keystone_session, missing_fatal=True):