]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: tell stdout where the monmap came from
authorSage Weil <sage@newdream.net>
Wed, 17 Dec 2008 19:21:59 +0000 (11:21 -0800)
committerSage Weil <sage@newdream.net>
Wed, 17 Dec 2008 23:42:23 +0000 (15:42 -0800)
src/mon/MonClient.cc

index fc7c51aaa7466c6452a6691a92f95efa5838c207..a2ade1a2e6147c6af47f6f5cef557324cc93efeb 100644 (file)
@@ -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;