From: John Spray Date: Tue, 29 Apr 2014 16:18:18 +0000 (+0100) Subject: mon: stop MDSMonitor when FS disabled X-Git-Tag: v0.84~164^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6109cc981f00cfaf3ce9d0a54c04597663bd073d;p=ceph.git mon: stop MDSMonitor when FS disabled Where 'stopped' means ignoring beacons and not performing 'tick' activities. Signed-off-by: John Spray --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 5edd14ef9708..bfcc134831ea 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -379,6 +379,11 @@ bool MDSMonitor::prepare_beacon(MMDSBeacon *m) int state = m->get_state(); version_t seq = m->get_seq(); + // Ignore beacons if filesystem is disabled + if (!mdsmap.enabled) { + return false; + } + // boot? if (state == MDSMap::STATE_BOOT) { // zap previous instance of this name? @@ -1228,6 +1233,9 @@ void MDSMonitor::tick() // ...if i am an active leader if (!is_active()) return; + // Do nothing if the filesystem is disabled + if (!mdsmap.enabled) return; + dout(10) << mdsmap << dendl; bool do_propose = false;