From: Jos Collin Date: Thu, 8 Aug 2024 05:22:14 +0000 (+0530) Subject: qa: do the set/get attribute on the remote filesystem X-Git-Tag: v20.0.0~1050^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a46c52387fbdce580dd50584f9ea01469de6d51;p=ceph.git qa: do the set/get attribute on the remote filesystem Fixes: https://tracker.ceph.com/issues/67435 Signed-off-by: Jos Collin --- diff --git a/qa/tasks/cephfs/test_mirroring.py b/qa/tasks/cephfs/test_mirroring.py index 2f9ebe6b1d59..c5d281f6d29b 100644 --- a/qa/tasks/cephfs/test_mirroring.py +++ b/qa/tasks/cephfs/test_mirroring.py @@ -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}")