]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
tests: openstack-integration is too agressive 747/head
authorLoic Dachary <ldachary@redhat.com>
Wed, 2 Dec 2015 11:15:10 +0000 (12:15 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 15 Dec 2015 10:55:23 +0000 (11:55 +0100)
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 <loic@dachary.org>
teuthology/openstack/test/openstack-integration.py

index 64ec9feb010d2bb00c678be85f830ea0866dadf1..58bd919d7f85e4eed9fc613d18f45af00e0b8de4 100644 (file)
@@ -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"