diff options
author | Venky Shankar <vshankar@redhat.com> | 2024-10-07 09:17:15 +0200 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2024-10-07 09:17:15 +0200 |
commit | 9f1311f9001f81b6b88bef31f43721d755ac506a (patch) | |
tree | 1d7d4c724d75aeeacab57909591138059a1e4054 /qa | |
parent | Merge pull request #56118 from joscollin/wip-B64711-qa-failure_cancel-mirrori... (diff) | |
parent | mgr/status: Fix 'fs status' json output (diff) | |
download | ceph-9f1311f9001f81b6b88bef31f43721d755ac506a.tar.xz ceph-9f1311f9001f81b6b88bef31f43721d755ac506a.zip |
Merge PR #59699 into main
* refs/pull/59699/head:
mgr/status: Fix 'fs status' json output
qa: Add test for 'fs status' in standby-replay mds setup
Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Diffstat (limited to 'qa')
-rw-r--r-- | qa/tasks/cephfs/test_admin.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/qa/tasks/cephfs/test_admin.py b/qa/tasks/cephfs/test_admin.py index ec06e38d78e..6a583cb4d0f 100644 --- a/qa/tasks/cephfs/test_admin.py +++ b/qa/tasks/cephfs/test_admin.py @@ -324,6 +324,8 @@ class TestFsStatus(TestAdminCommands): Test "ceph fs status subcommand. """ + MDSS_REQUIRED = 3 + def test_fs_status(self): """ That `ceph fs status` command functions. @@ -338,6 +340,31 @@ class TestFsStatus(TestAdminCommands): mdsmap = json.loads(self.get_ceph_cmd_stdout("fs", "status", "--format=json"))["mdsmap"] self.assertEqual(mdsmap[0]["state"], "active") + def test_fs_status_standby_replay(self): + """ + That `ceph fs status` command functions. + """ + + self.fs.set_allow_standby_replay(True) + + s = self.get_ceph_cmd_stdout("fs", "status") + self.assertTrue("active" in s) + self.assertTrue("standby-replay" in s) + self.assertTrue("0-s" in s) + self.assertTrue("standby" in s) + + mdsmap = json.loads(self.get_ceph_cmd_stdout("fs", "status", "--format=json-pretty"))["mdsmap"] + self.assertEqual(mdsmap[0]["state"], "active") + self.assertEqual(mdsmap[1]["state"], "standby-replay") + self.assertEqual(mdsmap[1]["rank"], "0-s") + self.assertEqual(mdsmap[2]["state"], "standby") + + mdsmap = json.loads(self.get_ceph_cmd_stdout("fs", "status", "--format=json"))["mdsmap"] + self.assertEqual(mdsmap[0]["state"], "active") + self.assertEqual(mdsmap[1]["state"], "standby-replay") + self.assertEqual(mdsmap[1]["rank"], "0-s") + self.assertEqual(mdsmap[2]["state"], "standby") + class TestAddDataPool(TestAdminCommands): """ |