]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add config to mark rank damaged in standby-replay
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 9 Sep 2021 21:53:55 +0000 (17:53 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 17 Sep 2021 01:53:09 +0000 (21:53 -0400)
For testing.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 391f3c8790e58d7f67b7bf93665775d5c4191b8c)

Conflicts:
src/common/options/mds.yaml.in

src/common/options.cc
src/mds/MDSRank.cc

index bdec3edafcdbcbb88e60ed754d39614fe3573f5a..20bc619677c4e20f38b826a2242ca0baaf5b5a6e 100644 (file)
@@ -8187,6 +8187,11 @@ std::vector<Option> get_mds_options() {
     .set_default(false)
     .set_flag(Option::FLAG_RUNTIME),
 
+    Option("mds_standby_replay_damaged", Option::TYPE_BOOL, Option::LEVEL_DEV)
+    .set_default(false)
+    .set_flag(Option::FLAG_RUNTIME)
+    .set_description(""),
+
     Option("mds_numa_node", Option::TYPE_INT, Option::LEVEL_ADVANCED)
     .set_default(-1)
     .set_flag(Option::FLAG_STARTUP)
index f085e266979c0ed25abce20050606fa9a4e3bdf4..457dfaec0a5659175ba1489549457f8dd0ac0b34 100644 (file)
@@ -16,6 +16,7 @@
 #include <typeinfo>
 #include "common/debug.h"
 #include "common/errno.h"
+#include "common/likely.h"
 #include "common/async/blocked_completion.h"
 
 #include "messages/MClientRequestForward.h"
@@ -1729,8 +1730,12 @@ void MDSRank::replay_start()
 {
   dout(1) << "replay_start" << dendl;
 
-  if (is_standby_replay())
+  if (is_standby_replay()) {
     standby_replaying = true;
+    if (unlikely(g_conf().get_val<bool>("mds_standby_replay_damaged"))) {
+      damaged();
+    }
+  }
 
   // Check if we need to wait for a newer OSD map before starting
   bool const ready = objecter->with_osdmap(