]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/status: Fix 'fs status' json output 60188/head
authorKotresh HR <khiremat@redhat.com>
Tue, 10 Sep 2024 08:00:54 +0000 (13:30 +0530)
committerKotresh HR <khiremat@redhat.com>
Tue, 8 Oct 2024 09:15:39 +0000 (14:45 +0530)
Fix rank field of standby-replay mds daemon in 'ceph fs status'
json output. The rank field for standby-replay mds daemons
were incorrect. It should be of the format '{rank}-s',
where {rank} is the active mds which the standby-replay is
following.

Fixes: https://tracker.ceph.com/issues/67978
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 20da9296a23fb599ca29d2e97453036b71a20904)

src/pybind/mgr/status/module.py

index 85e65266a5592297c8795b1ec5fd649b3f4712eb..2b59132c1cbafd3bad926c59d9974b84d2611445 100644 (file)
@@ -161,7 +161,7 @@ class Module(MgrModule):
 
                 if output_format in ('json', 'json-pretty'):
                     json_output['mdsmap'].append({
-                        'rank': rank,
+                        'rank': f"{daemon_info['rank']}-s",
                         'name': daemon_info['name'],
                         'state': 'standby-replay',
                         'events': events,