From: John Spray Date: Thu, 30 Apr 2015 10:43:21 +0000 (+0100) Subject: mds: handle case where rank 0 has no subtrees X-Git-Tag: v9.0.2~217^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=69a54e7bb474a9e74bc0ab6b8de2e9e4e47248e2;p=ceph.git mds: handle case where rank 0 has no subtrees Previously we always asked for STOPPING in this case, but in the case of rank 0 it's definitely an error condition indicating repair is needed. Signed-off-by: John Spray --- diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc index 74a40821be7..5aea27d9c31 100644 --- a/src/mds/MDS.cc +++ b/src/mds/MDS.cc @@ -2249,8 +2249,15 @@ void MDS::rejoin_done() // funny case: is our cache empty? no subtrees? if (!mdcache->is_subtrees()) { - dout(1) << " empty cache, no subtrees, leaving cluster" << dendl; - request_state(MDSMap::STATE_STOPPED); + if (whoami == 0) { + // The root should always have a subtree! + clog->error() << "No subtrees found for root MDS rank!"; + damaged(); + assert(mdcache->is_subtrees()); + } else { + dout(1) << " empty cache, no subtrees, leaving cluster" << dendl; + request_state(MDSMap::STATE_STOPPED); + } return; }