]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: stop MDSMonitor when FS disabled
authorJohn Spray <john.spray@inktank.com>
Tue, 29 Apr 2014 16:18:18 +0000 (17:18 +0100)
committerJohn Spray <jspray@redhat.com>
Mon, 30 Jun 2014 09:33:03 +0000 (10:33 +0100)
Where 'stopped' means ignoring beacons and
not performing 'tick' activities.

Signed-off-by: John Spray <john.spray@inktank.com>
src/mon/MDSMonitor.cc

index 5edd14ef970849348905d1441bbc796b5a85d8ae..bfcc134831ea6952d772e1df7a4ee3fe7425ccf5 100644 (file)
@@ -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;