]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: add crimson_debug_pg_always_active option
authorKefu Chai <kchai@redhat.com>
Thu, 9 May 2019 10:51:31 +0000 (18:51 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 13 May 2019 16:02:19 +0000 (00:02 +0800)
before crimson is able to peer, we should leave this option ON.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/legacy_config_opts.h
src/common/options.cc
src/crimson/osd/pg.cc

index 67607ae206d7da1d92f1971886052650433abb01..73149ec92f09ecbcc7c3c0bcde309eeacfb61bad 100644 (file)
@@ -1538,3 +1538,5 @@ OPTION(rgw_sts_token_introspection_url, OPT_STR)  // url for introspecting web t
 OPTION(rgw_sts_client_id, OPT_STR) // Client Id
 OPTION(rgw_sts_client_secret, OPT_STR) // Client Secret
 OPTION(debug_allow_any_pool_priority, OPT_BOOL)
+
+OPTION(crimson_debug_pg_always_active, OPT_BOOL)
index 64512e4008c5afb952af38f9fbb32a547c09068a..6734274613ee087a110b47d8253cbfb7fddf2554 100644 (file)
@@ -8240,6 +8240,10 @@ std::vector<Option> get_mds_client_options() {
     Option("debug_allow_any_pool_priority", Option::TYPE_BOOL, Option::LEVEL_DEV)
     .set_default(false)
     .set_description("Allow any pool priority to be set to test conversion to new range"),
+
+    Option("crimson_debug_pg_always_active", Option::TYPE_BOOL, Option::LEVEL_DEV)
+    .set_default(true)
+    .set_description("remove me once crimson peering works"),
   });
 }
 
index 82775219fd717c2e5b8d34d9f1073c00c5ba4bf8..b4f5f57822dd01828961b790f997350607050ced 100644 (file)
@@ -960,6 +960,9 @@ seastar::future<> PG::share_pg_info()
 seastar::future<> PG::wait_for_active()
 {
   logger().debug("wait_for_active: {}", pg_state_string(info.stats.state));
+  if (local_conf()->crimson_debug_pg_always_active) {
+    return seastar::now();
+  }
   if (test_state(PG_STATE_ACTIVE)) {
     return seastar::now();
   } else {