From: Jos Collin Date: Thu, 12 Oct 2023 09:23:16 +0000 (+0530) Subject: qa: tests set/get ceph.mirror.dirty_snap_id attribute succeeds in a remote filesystem X-Git-Tag: v17.2.8~619^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=57f7fd3e6ddafd29e256563f222743df4d9d5989;p=ceph.git qa: tests set/get ceph.mirror.dirty_snap_id attribute succeeds in a remote filesystem Fixes: https://tracker.ceph.com/issues/63099 Signed-off-by: Jos Collin (cherry picked from commit be551a6c68018207b6c730ae9d12341c796f5deb) --- diff --git a/qa/tasks/cephfs/test_mirroring.py b/qa/tasks/cephfs/test_mirroring.py index c1a940e3f759..be8817d749be 100644 --- a/qa/tasks/cephfs/test_mirroring.py +++ b/qa/tasks/cephfs/test_mirroring.py @@ -1296,3 +1296,13 @@ class TestMirroring(CephFSTestCase): self.disable_mirroring(self.primary_fs_name, self.primary_fs_id) self.mount_a.run_shell(["rmdir", "l1/.snap/snap0"]) self.mount_a.run_shell(["rmdir", "l1"]) + + def test_get_set_mirror_dirty_snap_id(self): + """ + That get/set ceph.mirror.dirty_snap_id attribute succeeds in a remote filesystem. + """ + 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) + 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}")