]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: collect all mds in mdsids() 17463/head
authorKefu Chai <kchai@redhat.com>
Tue, 5 Sep 2017 08:33:24 +0000 (16:33 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 5 Sep 2017 17:49:20 +0000 (01:49 +0800)
otherwise, only the active mds are returned.

Fixes: http://tracker.ceph.com/issues/21230
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/ceph.in

index 4843fec9e0b5e576a79eb5e3d74b50f48163af42..cb1bd86941950a99012db3e913cde9b90de4f2ca 100755 (executable)
@@ -173,15 +173,17 @@ def monids():
 
 
 def mdsids():
-    ret, outbuf, outs = json_command(cluster_handle, prefix='mds dump',
+    ret, outbuf, outs = json_command(cluster_handle, prefix='fs dump',
                                      argdict={'format': 'json'})
     if ret:
         raise RuntimeError('Can\'t contact mon for mds list')
     d = json.loads(outbuf.decode('utf-8'))
     l = []
-    infodict = d['info']
-    for mdsdict in infodict.values():
-        l.append(mdsdict['name'])
+    for info in d['standbys']:
+        l.append(info['name'])
+    for fs in d['filesystems']:
+        for info in fs['mdsmap']['info'].values():
+            l.append(info['name'])
     return l