]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: reset auth caps in setUp
authorJohn Spray <john.spray@redhat.com>
Mon, 27 Jul 2015 22:39:29 +0000 (23:39 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 28 Jul 2015 09:34:58 +0000 (10:34 +0100)
Signed-off-by: John Spray <john.spray@redhat.com>
tasks/cephfs/cephfs_test_case.py

index b03ecc0bd1e4b97623e8d5bd5220fede97522d28..3b2d7c23a3d6b816317b97f35066840192db79d6 100644 (file)
@@ -104,6 +104,12 @@ class CephFSTestCase(unittest.TestCase):
         for addr, blacklisted_at in blacklist.items():
             self.fs.mon_manager.raw_cluster_cmd("osd", "blacklist", "rm", addr)
 
+        # In case some test messed with auth caps, reset them
+        for mount in self.mounts:
+            self.fs.mon_manager.raw_cluster_cmd_result('auth', 'caps', "client.{0}".format(mount.client_id),
+                                                       'mon', 'allow r', 'osd',
+                                                       'allow rw pool={0}'.format(self.fs.get_data_pool_name()))
+
         self.fs.mds_restart()
         self.fs.wait_for_daemons()
         if not self.mount_a.is_mounted():