From: Yanhu Cao Date: Fri, 27 Oct 2017 05:28:03 +0000 (+0800) Subject: mgr: 'osd status' command return add state X-Git-Tag: v12.2.3~116^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ed24c8ce8f74a9b66d3da3dc2ae3ab5c4a4c86e6;p=ceph.git mgr: 'osd status' command return add state Signed-off-by: Yanhu Cao (cherry picked from commit f3475c9fdf5b32443df01c1a735c7289066c7508) --- diff --git a/src/pybind/mgr/status/module.py b/src/pybind/mgr/status/module.py index 70a7e36e6b07..517562570256 100644 --- a/src/pybind/mgr/status/module.py +++ b/src/pybind/mgr/status/module.py @@ -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()