mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
make cmonctl and cfuse use MonClient too
This commit is contained in:
parent
8b795e1e07
commit
1076d73814
@ -25,6 +25,8 @@ using namespace std;
|
||||
|
||||
#include "msg/SimpleMessenger.h"
|
||||
|
||||
#include "mon/MonClient.h"
|
||||
|
||||
#include "common/Timer.h"
|
||||
|
||||
#ifndef DARWIN
|
||||
@ -50,10 +52,11 @@ int main(int argc, const char **argv, const char *envp[]) {
|
||||
|
||||
if (g_conf.clock_tare) g_clock.tare();
|
||||
|
||||
// load monmap
|
||||
// get monmap
|
||||
MonMap monmap;
|
||||
int r = monmap.read(".ceph_monmap");
|
||||
assert(r >= 0);
|
||||
MonClient mc;
|
||||
if (mc.get_monmap(&monmap) < 0)
|
||||
return -1;
|
||||
|
||||
// start up network
|
||||
rank.bind();
|
||||
|
@ -20,6 +20,7 @@ using namespace std;
|
||||
#include "config.h"
|
||||
|
||||
#include "mon/MonMap.h"
|
||||
#include "mon/MonClient.h"
|
||||
#include "msg/SimpleMessenger.h"
|
||||
#include "messages/MMonCommand.h"
|
||||
#include "messages/MMonCommandAck.h"
|
||||
@ -98,10 +99,11 @@ int main(int argc, const char **argv, const char *envp[]) {
|
||||
nargs.push_back(args[i]);
|
||||
}
|
||||
|
||||
// load monmap
|
||||
// get monmap
|
||||
MonMap monmap;
|
||||
int r = monmap.read(".ceph_monmap");
|
||||
assert(r >= 0);
|
||||
MonClient mc;
|
||||
if (mc.get_monmap(&monmap) < 0)
|
||||
return -1;
|
||||
|
||||
// start up network
|
||||
rank.bind();
|
||||
|
Loading…
Reference in New Issue
Block a user