]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monc: resubscribe on monitor connection reset
authorSage Weil <sage@newdream.net>
Mon, 31 Aug 2009 21:38:22 +0000 (14:38 -0700)
committerSage Weil <sage@newdream.net>
Mon, 31 Aug 2009 21:38:22 +0000 (14:38 -0700)
src/cfuse.cc
src/csyn.cc
src/mon/MonClient.cc
src/mon/MonClient.h

index 4a6b0102bf8301f7341f37433ce703d639d71597..31f0657c83c1c870518fd381e9476e3a9eaad857 100644 (file)
@@ -76,7 +76,7 @@ int main(int argc, const char **argv, const char *envp[]) {
 
   rank.start();
 
-  rank.set_policy(entity_name_t::TYPE_MON, SimpleMessenger::Policy::lossy_fast_fail());
+  rank.set_policy(entity_name_t::TYPE_MON, SimpleMessenger::Policy::lossless());
   rank.set_policy(entity_name_t::TYPE_MDS, SimpleMessenger::Policy::lossless());
   rank.set_policy(entity_name_t::TYPE_OSD, SimpleMessenger::Policy::lossless());
 
index 1db9ca82bbd598e6d8bd8071d162d36a74242f63..58d61e33df76d748cb7d413de46b943e407c759c 100644 (file)
@@ -59,7 +59,7 @@ int main(int argc, const char **argv, char *envp[])
   rank.bind();
   cout << "starting csyn at " << rank.get_rank_addr() << std::endl;
 
-  rank.set_policy(entity_name_t::TYPE_MON, SimpleMessenger::Policy::lossy_fast_fail());
+  rank.set_policy(entity_name_t::TYPE_MON, SimpleMessenger::Policy::lossless());
   rank.set_policy(entity_name_t::TYPE_MDS, SimpleMessenger::Policy::lossless());
   rank.set_policy(entity_name_t::TYPE_OSD, SimpleMessenger::Policy::lossless());
 
index 3d0adc2b3f72f9c63710bcc6bb91ad1f6fa611a3..a0abf13f71375d9ac0bb9a39ee7058896dedc300 100644 (file)
@@ -247,6 +247,7 @@ void MonClient::handle_mount_ack(MClientMountAck* m)
   bufferlist::iterator p = m->monmap_bl.begin();
   ::decode(monmap, p);
 
+  messenger->_set_myaddr(m->addr);
   messenger->reset_myname(entity_name_t::CLIENT(m->client));
 
   // finish.
@@ -279,9 +280,9 @@ void MonClient::pick_new_mon()
 }
 
 
-void MonClient::ms_handle_reset(const entity_addr_t& peer)
+void MonClient::ms_handle_remote_reset(const entity_addr_t& peer)
 {
-  dout(10) << "ms_handle_reset " << peer << dendl;
+  dout(10) << "ms_handle_peer_reset " << peer << dendl;
   pick_new_mon();
   renew_subs();
 }
index 8ed4054c9b81e4a106ab9c642e0bb4e02d80b051..a7a925f8dc5bd8aa9853b0ef92801cffb0b0d309 100644 (file)
@@ -48,7 +48,7 @@ private:
   bool ms_dispatch(Message *m);
   void handle_monmap(MMonMap *m);
 
-  void ms_handle_reset(const entity_addr_t& peer);
+  void ms_handle_remote_reset(const entity_addr_t& peer);
 
  protected:
   class C_MountTimeout : public Context {