]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MDSMonitor: respect MDSMAP_DOWN when promoting standbys
authorJohn Spray <john.spray@redhat.com>
Wed, 7 Jan 2015 11:47:34 +0000 (11:47 +0000)
committerJohn Spray <john.spray@redhat.com>
Wed, 7 Jan 2015 14:13:12 +0000 (14:13 +0000)
Previously, a standby could become active even if 'cluster_down'
had been run.  This was awkward, because it would get you a
"laggy or crashed" mds for the standby that was actually
up and running, just being ignored because of cluster_down.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mon/MDSMonitor.cc

index a8666f0270e85551fd8f70a3769fefbff7efe6d4..25b22505531d10daa52fbf9112fd2bbaeee2a5e0 100644 (file)
@@ -1721,7 +1721,7 @@ void MDSMonitor::tick()
   // have a standby take over?
   set<mds_rank_t> failed;
   pending_mdsmap.get_failed_mds_set(failed);
-  if (!failed.empty()) {
+  if (!failed.empty() && !pending_mdsmap.test_flag(CEPH_MDSMAP_DOWN)) {
     set<mds_rank_t>::iterator p = failed.begin();
     while (p != failed.end()) {
       mds_rank_t f = *p++;