From e33065f3c999157d4a777636f45f884f1e16c25c Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 27 Jul 2015 23:39:29 +0100 Subject: [PATCH] tasks/cephfs: reset auth caps in setUp Signed-off-by: John Spray --- tasks/cephfs/cephfs_test_case.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/cephfs/cephfs_test_case.py b/tasks/cephfs/cephfs_test_case.py index b03ecc0bd1e4b..3b2d7c23a3d6b 100644 --- a/tasks/cephfs/cephfs_test_case.py +++ b/tasks/cephfs/cephfs_test_case.py @@ -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(): -- 2.39.5