]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: reset IDs of mounts between tests
authorJohn Spray <john.spray@redhat.com>
Wed, 11 Nov 2015 10:23:40 +0000 (10:23 +0000)
committerJohn Spray <john.spray@redhat.com>
Thu, 14 Jan 2016 22:55:29 +0000 (22:55 +0000)
because volumeclient test twiddles the IDs to
match the auth identities it creates.

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/cephfs/cephfs_test_case.py

index 98ca5fdb5b7b59cc6d910beecce603830648adb5..3d28a930918e367927ddc29dfb53d984a9938836 100644 (file)
@@ -140,6 +140,12 @@ class CephFSTestCase(unittest.TestCase):
                 'mon', 'allow r',
                 'osd', 'allow rw pool={0}'.format(self.fs.get_data_pool_name()))
 
+        log.info(client_mount_ids)
+
+        # In case the test changes the IDs of clients, stash them so that we can
+        # reset in tearDown
+        self._original_client_ids = client_mount_ids
+
         # In case there were any extra auth identities around from a previous
         # test, delete them
         for entry in self.auth_list():
@@ -171,6 +177,9 @@ class CephFSTestCase(unittest.TestCase):
         for m in self.mounts:
             m.teardown()
 
+        for i, m in enumerate(self.mounts):
+            m.client_id = self._original_client_ids[i]
+
         for subsys, key in self.configs_set:
             self.fs.clear_ceph_conf(subsys, key)