From f45712c19077c5cf5a9938fc3fd17b64ffe3a4ec Mon Sep 17 00:00:00 2001 From: Prashant D Date: Fri, 30 Oct 2020 06:40:43 -0400 Subject: [PATCH] mon: Log "ceph health detail" periodically in cluster log change mon_health_to_clog_interval from 1_hr -> 10_min to log health summary or detail more frequently. Fixes: https://tracker.ceph.com/issues/48042 Signed-off-by: Prashant Dhange --- PendingReleaseNotes | 4 ++++ qa/tasks/ceph.conf.template | 1 + src/common/legacy_config_opts.h | 1 + src/common/options.cc | 6 +++++- src/mon/Monitor.cc | 11 ++++++++++- 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 13e3e818927c7..864b492bcf697 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -26,6 +26,10 @@ >=15.0.0 -------- +* 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. + * The ``ceph df`` command now lists the number of pgs in each pool. * Monitors now have config option ``mon_allow_pool_size_one``, which is disabled diff --git a/qa/tasks/ceph.conf.template b/qa/tasks/ceph.conf.template index 6eff6e339a0c7..2679c2345401b 100644 --- a/qa/tasks/ceph.conf.template +++ b/qa/tasks/ceph.conf.template @@ -40,6 +40,7 @@ mon cluster log file level = debug debug asserts on shutdown = true + mon health detail to clog = false [osd] osd journal size = 100 diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 28c2a4593d0bb..2058532d2999d 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -263,6 +263,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) diff --git a/src/common/options.cc b/src/common/options.cc index 28ad9c7922789..3f52a9a01c182 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1941,7 +1941,7 @@ std::vector