From 1a94147b2c3556c3df66958508e944a045496ec2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 17 Dec 2008 11:21:59 -0800 Subject: [PATCH] mon: tell stdout where the monmap came from --- src/mon/MonClient.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index fc7c51aaa7466..a2ade1a2e6147 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -21,7 +21,7 @@ int MonClient::probe_mon(MonMap *pmonmap) parse_ip_port(g_conf.mon_host, monaddr); rank.bind(); - cout << " connecting to monitor at " << monaddr << " ..." << std::endl; + dout(1) << " connecting to monitor at " << monaddr << " ..." << dendl; Messenger *msgr = rank.register_entity(entity_name_t::CLIENT(-1)); msgr->set_dispatcher(this); @@ -47,7 +47,8 @@ int MonClient::probe_mon(MonMap *pmonmap) if (monmap_bl.length()) { pmonmap->decode(monmap_bl); - dout(2) << "get_monmap got monmap epoch " << pmonmap->epoch << " fsid " << pmonmap->fsid << dendl; + dout(2) << "get_monmap got monmap from " << monaddr << " fsid " << pmonmap->fsid << dendl; + cout << "[got monmap from " << monaddr << " fsid " << pmonmap->fsid << "]" << std::endl; } msgr->shutdown(); msgr->destroy(); @@ -71,8 +72,10 @@ int MonClient::get_monmap(MonMap *pmonmap) // file? const char *monmap_fn = ".ceph_monmap"; int r = pmonmap->read(monmap_fn); - if (r >= 0) + if (r >= 0) { + cout << "[opened monmap at .ceph_monmap fsid " << pmonmap->fsid << "]" << std::endl; return 0; + } cerr << "unable to read monmap from " << monmap_fn << ": " << strerror(errno) << std::endl; -- 2.39.5