Skip to content

Commit

Permalink
mon: refuse to stop mds if max_mds will make it rejoin
Browse files Browse the repository at this point in the history
Otherwise the MDS will leave the cluster and immediately rejoin, which is
useless and confusing to users.  See ceph#1820.

Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Feb 23, 2012
1 parent 963dec8 commit 21c4313
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mon/MDSMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,9 @@ bool MDSMonitor::prepare_command(MMonCommand *m)
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];
Expand Down

0 comments on commit 21c4313

Please sign in to comment.