Merge pull request #46362 from pdvian/wip-logm-mgrstat

mon/LogMonitor, MgrStat: Report logm and mgrstat committed version

Reviewed-by: Laura Flores <lflores@redhat.com>
This commit is contained in:
Yuri Weinstein 2022-06-14 13:43:42 -07:00 committed by GitHub
commit 35bf1ebb7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 0 deletions

View File

@ -1042,6 +1042,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)
{

View File

@ -166,6 +166,7 @@ private:
void tick() override; // check state, take actions
void dump_info(Formatter *f);
void check_subs();
void check_sub(Subscription *s);

View 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,

View File

@ -3711,6 +3711,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());