]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monc: set "hunting" to true when we reopen the mon session
authorGreg Farnum <greg@inktank.com>
Wed, 12 Feb 2014 21:37:50 +0000 (13:37 -0800)
committerGreg Farnum <greg@inktank.com>
Tue, 25 Feb 2014 19:40:23 +0000 (11:40 -0800)
If we don't have a connecton to a monitor, we want to retry to another
monitor regardless of whether it's the first time or not.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 60da8abe0ebf17ce818d6fcc6391401878123bb7)

src/mon/MonClient.cc

index 1da030e218361a686d5bf3e9ce09582863514caa..3bc24aedbc19f6f206f6b2e28aa4b2d8dec22609 100644 (file)
@@ -543,6 +543,7 @@ void MonClient::_reopen_session(int rank, string name)
 
   // restart authentication handshake
   state = MC_STATE_NEGOTIATING;
+  hunting = true;
 
   MAuth *m = new MAuth;
   m->protocol = 0;
@@ -573,7 +574,6 @@ bool MonClient::ms_handle_reset(Connection *con)
        return true;
       
       ldout(cct, 0) << "hunting for new mon" << dendl;
-      hunting = true;
       _reopen_session();
     }
   }