]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: do the set/get attribute on the remote filesystem 59093/head
authorJos Collin <jcollin@redhat.com>
Thu, 8 Aug 2024 05:22:14 +0000 (10:52 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 14 Aug 2024 07:43:08 +0000 (13:13 +0530)
Fixes: https://tracker.ceph.com/issues/67435
Signed-off-by: Jos Collin <jcollin@redhat.com>
qa/tasks/cephfs/test_mirroring.py

index 2f9ebe6b1d592e239f95c9cb95f581d116aea75e..c5d281f6d29b9621dc6211dbf00a10ec420fd404 100644 (file)
@@ -1494,8 +1494,21 @@ class TestMirroring(CephFSTestCase):
         """
         That get/set ceph.mirror.dirty_snap_id attribute succeeds in a remote filesystem.
         """
+        log.debug('reconfigure client auth caps')
+        self.get_ceph_cmd_result(
+            'auth', 'caps', "client.{0}".format(self.mount_b.client_id),
+                'mds', 'allow rw',
+                'mon', 'allow r',
+                'osd', 'allow rw pool={0}, allow rw pool={1}'.format(
+                    self.backup_fs.get_data_pool_name(),
+                    self.backup_fs.get_data_pool_name()))
+        log.debug(f'mounting filesystem {self.secondary_fs_name}')
+        self.mount_b.umount_wait()
+        self.mount_b.mount_wait(cephfs_name=self.secondary_fs_name)
+        log.debug('setting ceph.mirror.dirty_snap_id attribute')
         self.mount_b.run_shell(["mkdir", "-p", "d1/d2/d3"])
         attr = str(random.randint(1, 10))
         self.mount_b.setfattr("d1/d2/d3", "ceph.mirror.dirty_snap_id", attr)
+        log.debug('getting ceph.mirror.dirty_snap_id attribute')
         val = self.mount_b.getfattr("d1/d2/d3", "ceph.mirror.dirty_snap_id")
         self.assertEqual(attr, val, f"Mismatch for ceph.mirror.dirty_snap_id value: {attr} vs {val}")