From db2784581ecefd3c1a7042915e1549c4e87e3097 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 11 Mar 2025 15:18:03 -0400 Subject: [PATCH] qa: test alternate_name recovery during mds failover Fixes: https://tracker.ceph.com/issues/70409 Signed-off-by: Patrick Donnelly --- qa/tasks/cephfs/test_dir_charmap.py | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/qa/tasks/cephfs/test_dir_charmap.py b/qa/tasks/cephfs/test_dir_charmap.py index e4b52bc1f6c..d32b487ceb6 100644 --- a/qa/tasks/cephfs/test_dir_charmap.py +++ b/qa/tasks/cephfs/test_dir_charmap.py @@ -269,6 +269,51 @@ class TestCharMapVxattr(CephFSTestCase, CharMapMixin): else: self.fail("should fail") + +class TestCharMapRecovery(CephFSTestCase, CharMapMixin): + CLIENTS_REQUIRED = 1 + MDSS_REQUIRED = 1 + + def test_primary_altname_recovery(self): + """ + That the MDS can recovery the alternate_name from the primary link + encoded in the fullbit. + """ + + dname = "Grüßen" + self.mount_a.run_shell_payload("mkdir foo/") + self.mount_a.setfattr("foo/", "ceph.dir.casesensitive", "0") + self.mount_a.run_shell_payload(f"dd if=/dev/urandom of=foo/{dname} conv=fsync bs=1 count=1") + self.mount_a.umount_wait() + + self.fs.fail() + self.fs.set_joinable() + self.fs.wait_for_daemons() + + self.mount_a.mount() + self.mount_a.run_shell_payload("ls -l foo") + + def test_remote_altname_recovery(self): + """ + That the MDS can recovery the alternate_name from the remote link + encoded in the fullbit. + """ + + dname = "Grüßen" + self.mount_a.run_shell_payload("mkdir foo/") + self.mount_a.setfattr("foo/", "ceph.dir.casesensitive", "0") + self.mount_a.run_shell_payload("dd if=/dev/urandom of=foo/file conv=fsync bs=1 count=1") + self.mount_a.run_shell_payload(f"ln -T foo/file foo/{dname}") + self.mount_a.umount_wait() + + self.fs.fail() + self.fs.set_joinable() + self.fs.wait_for_daemons() + + self.mount_a.mount() + self.mount_a.run_shell_payload("ls -l foo") + + class TestNormalization(CephFSTestCase, CharMapMixin): """ Test charmap normalization. -- 2.39.5