#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 {
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;
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();
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 tick();
- void background_init();
+ void background_init(Context *completion);
void shutdown();
+
+ std::vector<MonCommand> get_command_set() const;
};
#endif