X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fmgr%2FMgr.h;h=68f2b40b4616d62fdfef22f7f7fad093234586c1;hb=c07f9fc5a4f48397831383549fb0482b93480643;hp=2efb2683f8a3248fb93491535d14aa351dd72185;hpb=7c673caec407dd16107e56e4b51a6d00f021315c;p=ceph.git diff --git a/ceph/src/mgr/Mgr.h b/ceph/src/mgr/Mgr.h index 2efb2683f..68f2b40b4 100644 --- a/ceph/src/mgr/Mgr.h +++ b/ceph/src/mgr/Mgr.h @@ -29,6 +29,7 @@ #include "auth/Auth.h" #include "common/Finisher.h" #include "common/Timer.h" +#include "mon/MgrMap.h" #include "DaemonServer.h" #include "PyModules.h" @@ -39,10 +40,10 @@ class MCommand; class MMgrDigest; class MLog; +class MServiceMap; class Objecter; class Client; - class MgrPyModule; class Mgr { @@ -52,11 +53,14 @@ protected: Client *client; Messenger *client_messenger; - Mutex lock; + mutable Mutex lock; SafeTimer timer; Finisher finisher; + // Track receipt of initial data during startup Cond fs_map_cond; + bool digest_received; + Cond digest_cond; PyModules py_modules; DaemonStateIndex daemon_state; @@ -72,7 +76,8 @@ protected: bool initializing; public: - Mgr(MonClient *monc_, Messenger *clientm_, Objecter *objecter_, + Mgr(MonClient *monc_, const MgrMap& mgrmap, + Messenger *clientm_, Objecter *objecter_, Client *client_, LogChannelRef clog_, LogChannelRef audit_clog_); ~Mgr(); @@ -83,11 +88,18 @@ public: void handle_fs_map(MFSMap* m); void handle_osd_map(); void handle_log(MLog *m); + void handle_service_map(MServiceMap *m); + + bool got_mgr_map(const MgrMap& m); bool ms_dispatch(Message *m); - void background_init(); + void tick(); + + void background_init(Context *completion); void shutdown(); + + std::vector get_command_set() const; }; #endif