Otherwise the MDS will leave the cluster and immediately rejoin, which is
useless and confusing to users. See #1820.
Signed-off-by: Sage Weil <sage@newdream.net>
r = -EBUSY;
ss << "can't tell the root (" << mdsmap.get_root() << ") or tableserver (" << mdsmap.get_tableserver()
<< " to stop unless it is the last mds in the cluster";
+ } else if (mdsmap.get_num_in_mds() <= mdsmap.get_max_mds()) {
+ r = -EBUSY;
+ ss << "must decrease max_mds or else MDS will rejoin after shutdown";
} else {
r = 0;
uint64_t gid = pending_mdsmap.up[who];