]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: massage handling of oneshot-replay.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 22 Apr 2011 00:10:46 +0000 (17:10 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 22 Apr 2011 00:10:46 +0000 (17:10 -0700)
We accidentally broke it in our last round of changes to support
standby-replay; patch it up again.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/mds/MDS.cc

index cd96e64a12b38274f2671152652acbd1de5b047e..c2ec2091ed367eff3c85f387b805ac240fd132d5 100644 (file)
@@ -482,7 +482,7 @@ int MDS::init(int wanted_state)
       dout(0) << "Specified oneshot replay mode but not an MDS!" << dendl;
       suicide();
     }
-    want_state = MDSMap::STATE_STANDBY;
+    want_state = MDSMap::STATE_BOOT;
     standby_type = wanted_state;
   }
 
@@ -875,6 +875,13 @@ void MDS::handle_mds_map(MMDSMap *m)
       request_state(standby_type);
 
     goto out;
+  } else if (state == MDSMap::STATE_STANDBY_REPLAY) {
+    if (standby_type && standby_type != MDSMap::STATE_STANDBY_REPLAY) {
+      want_state = standby_type;
+      beacon_send();
+      state = oldstate;
+      goto out;
+    }
   }
 
   if (whoami < 0) {