From 57f7fd3e6ddafd29e256563f222743df4d9d5989 Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Thu, 12 Oct 2023 14:53:16 +0530 Subject: [PATCH] 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) --- qa/tasks/cephfs/test_mirroring.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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}") -- 2.47.3