diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample index fe4959bd46..0ff01a151a 100644 --- a/etc/tempest.conf.sample +++ b/etc/tempest.conf.sample @@ -757,6 +757,11 @@ # value) #leave_dirty_stack=false +# Allows a full cleaning process after a stress test. Caution +# : this cleanup will remove every objects of every tenant. +# (boolean value) +#full_clean_stack=false + [telemetry] diff --git a/tempest/config.py b/tempest/config.py index d24ab34728..7bcb2954d4 100644 --- a/tempest/config.py +++ b/tempest/config.py @@ -591,7 +591,12 @@ StressGroup = [ default=False, help='Prevent the cleaning (tearDownClass()) between' ' each stress test run if an exception occurs' - ' during this run.') + ' during this run.'), + cfg.BoolOpt('full_clean_stack', + default=False, + help='Allows a full cleaning process after a stress test.' + ' Caution : this cleanup will remove every objects of' + ' every tenant.') ] diff --git a/tempest/stress/driver.py b/tempest/stress/driver.py index d4689c4aa0..3715636bf4 100644 --- a/tempest/stress/driver.py +++ b/tempest/stress/driver.py @@ -220,7 +220,7 @@ def stress_openstack(tests, duration, max_runs=None, stop_on_error=False): LOG.info("Run %d actions (%d failed)" % (sum_runs, sum_fails)) - if not had_errors: + if not had_errors and CONF.stress.full_clean_stack: LOG.info("cleaning up") cleanup.cleanup() if had_errors: