From ae69ebb6d30d42947aa41127b48b178c5a3693aa Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Wed, 2 Dec 2015 12:15:10 +0100 Subject: [PATCH] tests: openstack-integration is too agressive It will wipe out all targets in the tenant which can be devastating and unexpected when multiple teuthology clusters use the same tenant. Filter the deletion using the ownedby property to limit the destruction to the targets owned by the cluster in which the integration tests are run. Signed-off-by: Loic Dachary --- teuthology/openstack/test/openstack-integration.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/teuthology/openstack/test/openstack-integration.py b/teuthology/openstack/test/openstack-integration.py index 64ec9feb01..58bd919d7f 100644 --- a/teuthology/openstack/test/openstack-integration.py +++ b/teuthology/openstack/test/openstack-integration.py @@ -57,14 +57,11 @@ class Integration(object): # INTERNALERROR> IndexError: list index out of range # move that to def tearDown for debug and when it works move it # back in tearDownClass so it is not called on every test + ownedby = "ownedby='" + teuth_config.openstack['ip'] all_instances = teuthology.misc.sh("openstack server list -f json --long") for instance in json.loads(all_instances): - if 'teuthology=' in instance['Properties']: + if ownedby in instance['Properties']: teuthology.misc.sh("openstack server delete --wait " + instance['ID']) - teuthology.misc.sh(""" -teuthology/openstack/setup-openstack.sh \ - --populate-paddles - """) def setup_worker(self): self.logs = self.d + "/log" -- 2.39.5