]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mgr/Mgr.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / mgr / Mgr.h
index a4d8aad39ff703c47f1c9e4a429bc8385813a0fd..0248c9df61e6da3d8e5fc53004b3b902aa1d05be 100644 (file)
 #define CEPH_MGR_H_
 
 // Python.h comes first because otherwise it clobbers ceph's assert
-#include "Python.h"
-// Python's pyconfig-64.h conflicts with ceph's acconfig.h
-#undef HAVE_SYS_WAIT_H
-#undef HAVE_UNISTD_H
-#undef HAVE_UTIME_H
-#undef _POSIX_C_SOURCE
-#undef _XOPEN_SOURCE
+#include "PythonCompat.h"
 
 #include "mds/FSMap.h"
 #include "messages/MFSMap.h"
 #include "msg/Messenger.h"
 #include "auth/Auth.h"
 #include "common/Finisher.h"
-#include "common/Timer.h"
 #include "mon/MgrMap.h"
 
 #include "DaemonServer.h"
@@ -52,7 +45,6 @@ protected:
   Messenger *client_messenger;
 
   mutable Mutex lock;
-  SafeTimer timer;
   Finisher finisher;
 
   // Track receipt of initial data during startup
@@ -69,8 +61,8 @@ protected:
   LogChannelRef clog;
   LogChannelRef audit_clog;
 
-  PyModuleConfig load_config();
   void load_all_metadata();
+  std::map<std::string, std::string> load_store();
   void init();
 
   bool initialized;
@@ -84,24 +76,24 @@ public:
   ~Mgr();
 
   bool is_initialized() const {return initialized;}
-  entity_addr_t get_server_addr() const { return server.get_myaddr(); }
+  entity_addrvec_t get_server_addrs() const {
+    return server.get_myaddrs();
+  }
 
   void handle_mgr_digest(MMgrDigest* m);
   void handle_fs_map(MFSMap* m);
   void handle_osd_map();
   void handle_log(MLog *m);
   void handle_service_map(MServiceMap *m);
+  void handle_mon_map();
 
   bool got_mgr_map(const MgrMap& m);
 
   bool ms_dispatch(Message *m);
 
-  void tick();
-
   void background_init(Context *completion);
   void shutdown();
 
-  std::vector<MonCommand> get_command_set() const;
   std::map<std::string, std::string> get_services() const;
 };
 
@@ -123,7 +115,10 @@ public:
   std::string outs;
 
   MetadataUpdate(DaemonStateIndex &daemon_state_, const DaemonKey &key_)
-    : daemon_state(daemon_state_), key(key_) {}
+    : daemon_state(daemon_state_), key(key_)
+  {
+      daemon_state.notify_updating(key);
+  }
 
   void set_default(const std::string &k, const std::string &v)
   {