diff options
author | Sage Weil <sage@newdream.net> | 2009-03-16 18:57:23 +0100 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-03-16 18:57:23 +0100 |
commit | 1bcccc3be635abbb04e7ef108ba31dce7d0db90a (patch) | |
tree | 1107e15a7816ea07e99546db3d9e365faf01c140 /src/mon/MonClient.cc | |
parent | initscript: fix btrfs path default to osd data (diff) | |
parent | kclient: fix uninitialized var warnings (diff) | |
download | ceph-1bcccc3be635abbb04e7ef108ba31dce7d0db90a.tar.xz ceph-1bcccc3be635abbb04e7ef108ba31dce7d0db90a.zip |
Merge commit '1e8073b75ad5172a1ef975e7c6c42406888f56ae'v0.7.1
Conflicts:
src/init-ceph
src/mkcephfs
Diffstat (limited to 'src/mon/MonClient.cc')
-rw-r--r-- | src/mon/MonClient.cc | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 6571d0e9ba1..b30aa32dc73 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -65,8 +65,7 @@ int MonClient::probe_mon(MonMap *pmonmap) if (monmap_bl.length()) { pmonmap->decode(monmap_bl); - dout(2) << "get_monmap got monmap from " << monaddrs[i] << " fsid " << pmonmap->fsid << dendl; - cout << "[got monmap from " << monaddrs[i] << " fsid " << pmonmap->fsid << "]" << std::endl; + dout(1) << "[got monmap from " << monaddrs[i] << " fsid " << pmonmap->fsid << "]" << dendl; } msgr->shutdown(); msgr->destroy(); @@ -75,8 +74,7 @@ int MonClient::probe_mon(MonMap *pmonmap) if (monmap_bl.length()) return 0; - cerr << "unable to fetch monmap from " << monaddrs - << ": " << strerror(errno) << std::endl; + cerr << "unable to fetch monmap from " << monaddrs << std::endl; return -1; // failed } @@ -84,10 +82,22 @@ int MonClient::get_monmap(MonMap *pmonmap) { static string monstr; + if (g_conf.monmap) { + // file? + const char *monmap_fn = g_conf.monmap; + int r = pmonmap->read(monmap_fn); + if (r >= 0) { + dout(1) << "[opened monmap at " << monmap_fn << " fsid " << pmonmap->fsid << "]" << dendl; + return 0; + } + + cerr << "unable to read monmap from " << monmap_fn << ": " << strerror(errno) << std::endl; + } + if (!g_conf.mon_host) { // cluster conf? - ConfFile a(g_conf.cluster_conf_file); - ConfFile b("cluster.conf"); + ConfFile a(g_conf.conf); + ConfFile b("ceph.conf"); ConfFile *c = 0; if (a.parse()) @@ -116,18 +126,6 @@ int MonClient::get_monmap(MonMap *pmonmap) probe_mon(pmonmap) == 0) return 0; - if (g_conf.monmap_file) { - // file? - const char *monmap_fn = g_conf.monmap_file; - int r = pmonmap->read(monmap_fn); - if (r >= 0) { - cout << "[opened monmap at " << monmap_fn << " fsid " << pmonmap->fsid << "]" << std::endl; - return 0; - } - - cerr << "unable to read monmap from " << monmap_fn << ": " << strerror(errno) << std::endl; - } - cerr << "must specify monitor address (-m monaddr) or cluster conf (-C cluster.conf) or monmap file (-M monmap)" << std::endl; return -1; } |