]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: 'osd status' command return add state 18173/head
authorYanhu Cao <gmayyyha@gmail.com>
Fri, 27 Oct 2017 05:28:03 +0000 (13:28 +0800)
committerYanhu Cao <gmayyyha@gmail.com>
Mon, 6 Nov 2017 00:53:59 +0000 (08:53 +0800)
Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
src/pybind/mgr/status/module.py

index 14d7ae404bbde2e15ac25ce4a7b1c81f758b6da8..7d14600bf8a452377afbe7e693adab2c814adfc1 100644 (file)
@@ -252,7 +252,7 @@ class Module(MgrModule):
         return 0, "", output
 
     def handle_osd_status(self, cmd):
-        osd_table = PrettyTable(['id', 'host', 'used', 'avail', 'wr ops', 'wr data', 'rd ops', 'rd data'])
+        osd_table = PrettyTable(['id', 'host', 'used', 'avail', 'wr ops', 'wr data', 'rd ops', 'rd data', 'state'])
         osdmap = self.get("osd_map")
 
         filter_osds = set()
@@ -298,6 +298,7 @@ class Module(MgrModule):
                                self.format_bytes(self.get_rate("osd", osd_id.__str__(), "osd.op_in_bytes"), 5),
                                self.format_dimless(self.get_rate("osd", osd_id.__str__(), "osd.op_r"), 5),
                                self.format_bytes(self.get_rate("osd", osd_id.__str__(), "osd.op_out_bytes"), 5),
+                               ','.join(osd['state']),
                                ])
 
         return 0, "", osd_table.get_string()