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 <john.spray@redhat.com>
// 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;
}