]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: oldest_map and newest_map should be displayed directly 54913/head
authorzhangjianwei2 <zhangjianwei2_yewu@cmss.chinamobile.com>
Fri, 15 Dec 2023 08:42:07 +0000 (16:42 +0800)
committerzhangjianwei2 <zhangjianwei2_yewu@cmss.chinamobile.com>
Fri, 15 Dec 2023 09:06:52 +0000 (17:06 +0800)
9215996586ba79302c07e5cf586ec2add1ac159e delete these,
ceph daemon osd.x status
when osd status is displayed, only superblock.maps (begin ~ len) can be seen.
this need calculate maps to get oldest_map/newest_map held by the current osd.
moreover, it cannot be simply calculate. need pay attention to the boundaries。
this is not very friendly.

Fixes: https://tracker.ceph.com/issues/63836
Signed-off-by: zhangjianwei2 <zhangjianwei2@cmss.chinamobile.com>
src/crimson/osd/osd.cc
src/osd/OSD.cc

index f3648c6df277065e585480d16a19ab64ea5391f0..2c58b7c638c92a43cf8b302b2a89f48c5c742fc9 100644 (file)
@@ -713,6 +713,8 @@ void OSD::dump_status(Formatter* f) const
   f->dump_unsigned("whoami", superblock.whoami);
   f->dump_string("state", pg_shard_manager.get_osd_state_string());
   f->dump_stream("maps") << superblock.maps;
+  f->dump_stream("oldest_map") << superblock.get_oldest_map();
+  f->dump_stream("newest_map") << superblock.get_newest_map();
   f->dump_unsigned("cluster_osdmap_trim_lower_bound",
                    superblock.cluster_osdmap_trim_lower_bound);
   f->dump_unsigned("num_pgs", pg_shard_manager.get_num_pgs());
index a79b388deca4ac8c2cc78b96587d82eb8ef3dfb3..f7468653713442bef687aa22163f05e24f9f7969 100644 (file)
@@ -2696,6 +2696,8 @@ void OSD::asok_command(
     f->dump_unsigned("whoami", superblock.whoami);
     f->dump_string("state", get_state_name(get_state()));
     f->dump_stream("maps") << superblock.maps;
+    f->dump_stream("oldest_map") << superblock.get_oldest_map();
+    f->dump_stream("newest_map") << superblock.get_newest_map();
     f->dump_unsigned("cluster_osdmap_trim_lower_bound",
                      superblock.cluster_osdmap_trim_lower_bound);
     f->dump_unsigned("num_pgs", num_pgs);