]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: do the set/get attribute on the remote filesystem
authorJos Collin <jcollin@redhat.com>
Thu, 8 Aug 2024 05:22:14 +0000 (10:52 +0530)
committerJos Collin <jcollin@redhat.com>
Tue, 24 Jun 2025 13:51:35 +0000 (19:21 +0530)
Fixes: https://tracker.ceph.com/issues/67435
Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit 9a46c52387fbdce580dd50584f9ea01469de6d51)

qa/tasks/cephfs/test_mirroring.py

index 7299577986a49dc3b78c51333f9f2be6dfb4bbaa..5a1a30c829c59fb4bad318247da9c3da8eb6ed4c 100644 (file)
@@ -1514,9 +1514,22 @@ 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}")