]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mgr/Mgr.h
update sources to v12.1.2
[ceph.git] / ceph / src / mgr / Mgr.h
index 2efb2683f8a3248fb93491535d14aa351dd72185..68f2b40b4616d62fdfef22f7f7fad093234586c1 100644 (file)
@@ -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"
 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<MonCommand> get_command_set() const;
 };
 
 #endif