]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: only remove laggy standby mds's; mark others laggy
authorSage Weil <sage@newdream.net>
Mon, 13 Sep 2010 20:21:36 +0000 (13:21 -0700)
committerSage Weil <sage@newdream.net>
Mon, 13 Sep 2010 20:21:36 +0000 (13:21 -0700)
This fixes botched ad8a0d9b364ce4c1e3ac0b0f29d23a135f53a37e.

src/mon/MDSMonitor.cc

index 9d5b711ec5c3bfbda4e9b85bce6ee186047c904f..7d87bb5ceee019c525d025ee41b252dedf0543bd 100644 (file)
@@ -799,11 +799,18 @@ void MDSMonitor::tick()
        last_beacon.erase(gid);
        do_propose = true;
       } else if (!info.laggy()) {
-       // remove it
-       dout(10) << " removing " << info.addr << " mds" << info.rank << "." << info.inc
-                << " " << ceph_mds_state_name(info.state)
-                << " (laggy)" << dendl;
-       pending_mdsmap.mds_info.erase(gid);
+       if (info.state == MDSMap::STATE_STANDBY) {
+         // remove it
+         dout(10) << " removing " << info.addr << " mds" << info.rank << "." << info.inc
+                  << " " << ceph_mds_state_name(info.state)
+                  << " (laggy)" << dendl;
+         pending_mdsmap.mds_info.erase(gid);
+       } else {
+         dout(10) << " marking " << info.addr << " mds" << info.rank << "." << info.inc
+                  << " " << ceph_mds_state_name(info.state)
+                  << " laggy" << dendl;
+         info.laggy_since = now;
+       }
        last_beacon.erase(gid);
        do_propose = true;
       }