]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monclient: always subscribe to monmap
authorSage Weil <sage@newdream.net>
Fri, 16 Oct 2009 23:28:09 +0000 (16:28 -0700)
committerSage Weil <sage@newdream.net>
Fri, 16 Oct 2009 23:28:09 +0000 (16:28 -0700)
This ensure we keep the mon session alive, even if the user
doesn't subscribe to anything else.

src/mon/MonClient.cc

index 5a6775453722f6552684cf8e911f4cd7284ede7c..1663e7eeca63726531abb0d49e0b20a1a8b0424c 100644 (file)
@@ -111,6 +111,7 @@ int MonClient::get_monmap()
   dout(10) << "get_monmap" << dendl;
   Mutex::Locker l(monc_lock);
   
+  _sub_want("monmap", monmap.get_epoch());
   want_monmap = true;
   if (cur_mon < 0)
     _reopen_session();
@@ -119,7 +120,6 @@ int MonClient::get_monmap()
     map_cond.Wait(monc_lock);
 
   dout(10) << "get_monmap done" << dendl;
-
   return 0;
 }
 
@@ -248,6 +248,7 @@ int MonClient::mount(double mount_timeout)
   }
 
   // only first mounter does the work
+  _sub_want("monmap", monmap.get_epoch());
   mounting++;
   if (mounting == 1) {
     if (cur_mon < 0)