]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monclient: reopen session on monmap change
authorSage Weil <sage@newdream.net>
Tue, 13 Sep 2011 04:23:00 +0000 (21:23 -0700)
committerSage Weil <sage@newdream.net>
Tue, 13 Sep 2011 04:23:00 +0000 (21:23 -0700)
If our cur_mon is removed from the monmap, reopen the session.  Do not
call _pick_new_mon() directly or we won't reset state, won't
reauthenticate, etc.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/MonClient.cc

index 2d48fd857bfc58fe509200ff99cd725bce1c19b4..187ea50f21cdda402e44b2f289bca6d11c2a55fd 100644 (file)
@@ -325,7 +325,7 @@ void MonClient::handle_monmap(MMonMap *m)
 
   if (!monmap.get_addr_name(cur_con->get_peer_addr(), cur_mon)) {
     ldout(cct, 10) << "mon." << cur_mon << " went away" << dendl;
-    _pick_new_mon();  // can't find the mon we were talking to (above)
+    _reopen_session();  // can't find the mon we were talking to (above)
   } else {
     _finish_hunting();
   }