]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: make shutdown debug conditional (and off by default)
authorSage Weil <sage@redhat.com>
Thu, 21 Sep 2017 19:19:47 +0000 (15:19 -0400)
committerSage Weil <sage@redhat.com>
Thu, 21 Sep 2017 19:19:47 +0000 (15:19 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/options.cc
src/osd/OSD.cc

index d976fdd8d7817209a47dea54be484a21abf12afd..8562062b42b6f9dfbd7f30d746eff4d8d469473b 100644 (file)
@@ -2606,6 +2606,10 @@ std::vector<Option> get_global_options() {
     .set_default(false)
     .set_description(""),
 
+    Option("osd_debug_shutdown", Option::TYPE_BOOL, Option::LEVEL_DEV)
+    .set_default(false)
+    .set_description("Turn up debug levels during shutdown"),
+
     Option("osd_debug_crash_on_ignored_backoff", Option::TYPE_BOOL, Option::LEVEL_DEV)
     .set_default(false)
     .set_description(""),
index 7b0efa8788093c13a716056f7b04ede773e86bd4..925196c6422a6bc5f3aca13717367553842e4ab0 100644 (file)
@@ -3236,12 +3236,14 @@ int OSD::shutdown()
   set_state(STATE_STOPPING);
 
   // Debugging
-  cct->_conf->set_val("debug_osd", "100");
-  cct->_conf->set_val("debug_journal", "100");
-  cct->_conf->set_val("debug_filestore", "100");
-  cct->_conf->set_val("debug_bluestore", "100");
-  cct->_conf->set_val("debug_ms", "100");
-  cct->_conf->apply_changes(NULL);
+  if (cct->_conf->get_val<bool>("osd_debug_shutdown")) {
+    cct->_conf->set_val("debug_osd", "100");
+    cct->_conf->set_val("debug_journal", "100");
+    cct->_conf->set_val("debug_filestore", "100");
+    cct->_conf->set_val("debug_bluestore", "100");
+    cct->_conf->set_val("debug_ms", "100");
+    cct->_conf->apply_changes(NULL);
+  }
 
   // stop MgrClient earlier as it's more like an internal consumer of OSD
   mgrc.shutdown();