]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/LogMonitor, MgrStat: Report logm and mgrstat committed version 46362/head
authorPrashant D <pdhange@redhat.com>
Mon, 23 May 2022 06:32:37 +0000 (02:32 -0400)
committerPrashant D <pdhange@redhat.com>
Mon, 23 May 2022 07:09:50 +0000 (03:09 -0400)
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 <pdhange@redhat.com>
src/mon/LogMonitor.cc
src/mon/LogMonitor.h
src/mon/MgrStatMonitor.h
src/mon/Monitor.cc

index c196e8429fbe94e279811d374cae0d3de17fea27..0f883862384a91bf60cb2831bcda9ddf93073162 100644 (file)
@@ -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)
 {
index 715f380af6a4ed407ef0b5b8fafa0685fb6423c9..d83c02ba7c24debbceffd5b87bba0c9bc11dd273 100644 (file)
@@ -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);
 
index aa0ae49ffd61d4601ef25b70bb5a7854da02642d..8f27a98781cf3e3df8fc0e44d71f5a033a96e087 100644 (file)
@@ -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,
index 2d6e7cf4572d19db492f8b1e40682d5f22cde8f4..8089c44006c465a49464423949c6a01f13b0a1e8 100644 (file)
@@ -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());