X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fmon%2FMgrMonitor.h;h=f63fb714f795d6be8bb5d01eb207593225a09860;hb=c07f9fc5a4f48397831383549fb0482b93480643;hp=0dc1af571deeaaf9dcdf50789a5e9d14d823a307;hpb=9439ae556f035e65c9c107ae13ddd09457dbbecd;p=ceph.git diff --git a/ceph/src/mon/MgrMonitor.h b/ceph/src/mon/MgrMonitor.h index 0dc1af571..f63fb714f 100644 --- a/ceph/src/mon/MgrMonitor.h +++ b/ceph/src/mon/MgrMonitor.h @@ -14,9 +14,13 @@ #ifndef CEPH_MGRMONITOR_H #define CEPH_MGRMONITOR_H +#include +#include + #include "include/Context.h" #include "MgrMap.h" #include "PaxosService.h" +#include "MonCommand.h" class MgrMonitor: public PaxosService { @@ -24,6 +28,9 @@ class MgrMonitor: public PaxosService MgrMap pending_map; bool ever_had_active_mgr = false; + std::map pending_metadata; + std::set pending_metadata_rm; + utime_t first_seen_inactive; std::map last_beacon; @@ -45,6 +52,10 @@ class MgrMonitor: public PaxosService health_status_t should_warn_about_mgr_down(); + // Command descriptions we've learned from the active mgr + std::vector command_descs; + std::vector pending_command_descs; + public: MgrMonitor(Monitor *mn, Paxos *p, const string& service_name) : PaxosService(mn, p, service_name) @@ -88,6 +99,16 @@ public: void print_summary(Formatter *f, std::ostream *ss) const; + const std::vector &get_command_descs() const { + return command_descs; + } + + int load_metadata(const string& name, std::map& m, + ostream *err); + int dump_metadata(const string& name, Formatter *f, ostream *err); + void count_metadata(const string& field, Formatter *f); + void count_metadata(const string& field, std::map *out); + friend class C_Updated; };