Prevent stale isolated tenants from blocking test runs
Especially while developing tests, it's easy to kill a test before
it has a chance to clean up the tenants it has created for isolation.
Since the database has a lot of consistency requirements, it's non-
trivial to go clean these up, and (for me) re-running stack.sh is
the quickest path to a running system again (which is annoying).
This patch adds a configuration option that can allow the tenant
creation to avoid the failure by re-using the existing tenant/user
already present. I think it's safe to have this enabled by default
since it only happens if tenant isolation is enabled.
Also, this augments the error message for the condition (in the case
that the configuration option is disabled) to better indicate
what is happening.
Change-Id: I97052b827ca1b2076ac67025539339b39d3260ae
diff --git a/etc/tempest.conf.tpl b/etc/tempest.conf.tpl
index f268de2..ac1664a 100644
--- a/etc/tempest.conf.tpl
+++ b/etc/tempest.conf.tpl
@@ -29,6 +29,12 @@
# are known.
allow_tenant_isolation = %COMPUTE_ALLOW_TENANT_ISOLATION%
+# Allows test cases to create/destroy tenants and users. This option
+# enables isolated test cases and better parallel execution,
+# but also requires that OpenStack Identity API admin credentials
+# are known.
+allow_tenant_reuse = %COMPUTE_ALLOW_TENANT_REUSE%
+
# This should be the username of a user WITHOUT administrative privileges
username = %USERNAME%
# The above non-administrative user's password