From: Loic Dachary Date: Wed, 2 Dec 2015 11:15:10 +0000 (+0100) Subject: tests: openstack-integration is too agressive X-Git-Tag: 1.1.0~716^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ae69ebb6d30d42947aa41127b48b178c5a3693aa;p=teuthology.git 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 --- 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"