]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Log "ceph health detail" periodically in cluster log 38118/head
authorPrashant D <pdhange@redhat.com>
Fri, 30 Oct 2020 10:40:43 +0000 (06:40 -0400)
committerNeha Ojha <nojha@redhat.com>
Tue, 24 Nov 2020 17:57:36 +0000 (17:57 +0000)
change mon_health_to_clog_interval from 1_hr -> 10_min to
log health summary or detail more frequently.

No HealthMonitor class in nautilus.

Fixes: https://tracker.ceph.com/issues/48042
Signed-off-by: Prashant Dhange <pdhange@redhat.com>
(cherry picked from commit f45712c19077c5cf5a9938fc3fd17b64ffe3a4ec)

 Conflicts:
PendingReleaseNotes - add and restructure 14.2.16

PendingReleaseNotes
qa/tasks/ceph.conf.template
src/common/legacy_config_opts.h
src/common/options.cc
src/mon/Monitor.cc

index 1722a43bfaff36808a787669e66847bd038d81fe..acbe6dcc4297913ebd0f7f49587ad804cfd1d2ae 100644 (file)
@@ -1,9 +1,25 @@
+14.2.16
+-------
+
+* The structured output of ``ceph status`` or ``ceph -s`` is now more
+  concise, particularly the ``mgrmap`` and ``monmap`` sections, and the
+  structure of the ``osdmap`` section has been cleaned up.
+
+* MON: The cluster log now logs health detail every ``mon_health_to_clog_interval``,
+  which has been changed from 1hr to 10min. Logging of health detail will be
+  skipped if there is no change in health summary since last known.
+
+
 14.2.15
 -------
 
 * MGR: progress module can now be turned on/off, using the commands:
   ``ceph progress on`` and ``ceph progress off``.
 
-* The structured output of ``ceph status`` or ``ceph -s`` is now more
-  concise, particularly the ``mgrmap`` and ``monmap`` sections, and the
-  structure of the ``osdmap`` section has been cleaned up.
+
+14.2.13
+-------
+
+* This release fixes a regression introduced in 14.2.12 which broke deployments
+  that referred to MON hosts using DNS names instead of IP addresses in the
+  ``mon_host`` parameter in ``/etc/ceph/ceph.conf``.
index 5be8c06bd16d538605c9ece8adcea9c78a243334..0c0f503abfd0adb310fc32a48a716486645c285b 100644 (file)
@@ -36,6 +36,7 @@
 
        mon cluster log file level = debug
        debug asserts on shutdown = true
+       mon health detail to clog = false
 
        # we see this fail in qa on *nautilus*; bump up retries
        mon_client_directed_command_retry = 4
index 586b3f6d8e161a4859435ab768a405824ee65474..d1869cc00318039bdb76dbb25ed1730f922d1aea 100644 (file)
@@ -272,6 +272,7 @@ OPTION(mon_reweight_max_change, OPT_DOUBLE)
 OPTION(mon_health_to_clog, OPT_BOOL)
 OPTION(mon_health_to_clog_interval, OPT_INT)
 OPTION(mon_health_to_clog_tick_interval, OPT_DOUBLE)
+OPTION(mon_health_detail_to_clog, OPT_BOOL)
 OPTION(mon_data_avail_crit, OPT_INT)
 OPTION(mon_data_avail_warn, OPT_INT)
 OPTION(mon_data_size_warn, OPT_U64) // issue a warning when the monitor's data store goes over 15GB (in bytes)
index a4bd01a0f18ac8473958c3f503b8de9221772680..df16c9457f746e266931284b22c9dae46d015099 100644 (file)
@@ -1871,7 +1871,7 @@ std::vector<Option> get_global_options() {
     .set_description("log monitor health to cluster log"),
 
     Option("mon_health_to_clog_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
-    .set_default(1_hr)
+    .set_default(10_min)
     .add_service("mon")
     .set_description("frequency to log monitor health to cluster log")
     .add_see_also("mon_health_to_clog"),
@@ -1881,6 +1881,10 @@ std::vector<Option> get_global_options() {
     .add_service("mon")
     .set_description(""),
 
+    Option("mon_health_detail_to_clog", Option::TYPE_BOOL, Option::LEVEL_DEV)
+    .set_default(true)
+    .set_description("log health detail to cluster log"),
+
     Option("mon_health_max_detail", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
     .set_default(50)
     .add_service("mon")
index 793031d21c65b22871385ac1eff49ac0dbbb5be7..612acbb31a489806a6ff9021c053638f93060e6f 100644 (file)
@@ -2777,7 +2777,16 @@ void Monitor::do_health_to_clog(bool force)
       summary == health_status_cache.summary &&
       level == health_status_cache.overall)
     return;
-  clog->health(level) << "overall " << summary;
+
+  if (g_conf()->mon_health_detail_to_clog &&
+      summary != health_status_cache.summary &&
+      level != HEALTH_OK) {
+    string details;
+    level = get_health_status(true, nullptr, &details);
+    clog->health(level) << "Health detail: " << details;
+  } else {
+    clog->health(level) << "overall " << summary;
+  }
   health_status_cache.summary = summary;
   health_status_cache.overall = level;
 }