From: Prashant D Date: Mon, 23 May 2022 06:32:37 +0000 (-0400) Subject: mon/LogMonitor, MgrStat: Report logm and mgrstat committed version X-Git-Tag: v18.0.0~691^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c2f263d64f7150e055946bb38641aec9c421ef92;p=ceph.git mon/LogMonitor, MgrStat: Report logm and mgrstat committed version Only way to get the first and last committed version for logm and mgrstat is through the monstore db dump. Reporting first and last committed version for logm and mgrstat in ceph report will help in debugging monstore is too big issues. Signed-off-by: Prashant D --- diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc index c196e8429fb..0f883862384 100644 --- a/src/mon/LogMonitor.cc +++ b/src/mon/LogMonitor.cc @@ -1038,6 +1038,11 @@ bool LogMonitor::prepare_command(MonOpRequestRef op) return false; } +void LogMonitor::dump_info(Formatter *f) +{ + f->dump_unsigned("logm_first_committed", get_first_committed()); + f->dump_unsigned("logm_last_committed", get_last_committed()); +} int LogMonitor::sub_name_to_id(const string& n) { diff --git a/src/mon/LogMonitor.h b/src/mon/LogMonitor.h index 715f380af6a..d83c02ba7c2 100644 --- a/src/mon/LogMonitor.h +++ b/src/mon/LogMonitor.h @@ -164,6 +164,7 @@ private: void tick() override; // check state, take actions + void dump_info(Formatter *f); void check_subs(); void check_sub(Subscription *s); diff --git a/src/mon/MgrStatMonitor.h b/src/mon/MgrStatMonitor.h index aa0ae49ffd6..8f27a98781c 100644 --- a/src/mon/MgrStatMonitor.h +++ b/src/mon/MgrStatMonitor.h @@ -94,6 +94,8 @@ public: void dump_info(ceph::Formatter *f) const { digest.dump(f); f->dump_object("servicemap", get_service_map()); + f->dump_unsigned("mgrstat_first_committed", get_first_committed()); + f->dump_unsigned("mgrstat_last_committed", get_last_committed()); } void dump_cluster_stats(std::stringstream *ss, ceph::Formatter *f, diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 2d6e7cf4572..8089c44006c 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -3710,6 +3710,7 @@ void Monitor::handle_command(MonOpRequestRef op) mdsmon()->dump_info(f.get()); authmon()->dump_info(f.get()); mgrstatmon()->dump_info(f.get()); + logmon()->dump_info(f.get()); paxos->dump_info(f.get());