]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmonctl: pick new mon on timeout
authorSage Weil <sage@newdream.net>
Mon, 17 Nov 2008 20:57:11 +0000 (12:57 -0800)
committerSage Weil <sage@newdream.net>
Mon, 17 Nov 2008 22:43:34 +0000 (14:43 -0800)
src/cmonctl.cc

index d37279d4e3c3b22d891ca83c7b039633f6f70e1c..37a57622f0e2d663b2ac80b73f63b4192332d9f8 100644 (file)
@@ -51,21 +51,20 @@ string status[4];
 
 
 // refresh every second
-void get_status();
+void get_status(bool newmon=false);
 
 struct C_Refresh : public Context {
   void finish(int r) {
-    get_status();
+    get_status(true);
   }
 };
 
 SafeTimer timer(lock);
 Context *event = 0;
 
-void get_status()
+void get_status(bool newmon)
 {
-  int mon = monmap.pick_mon();
-  //for (int i=0; i<LAST; i++) {
+  int mon = monmap.pick_mon(newmon);
 
   vector<string> vcmd(2);
   vcmd[0] = prefix[which];