From 127236f6766c8539dbcf6a7957b4f3a04e7807db Mon Sep 17 00:00:00 2001 From: =?utf8?q?Piotr=20Da=C5=82ek?= Date: Wed, 13 Dec 2017 16:13:33 +0100 Subject: [PATCH] options, Mon: monitor the snap trim queues MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If new option "mon osd snap trim queue warn on" is set to value larger than 0 (32768 by default), cluster will go into HEALTH_WARN state once any pg has a snap trim queue larger than that value. This can be used as an indicator of snaptrimmer not keeping up and disk space not being reclaimed fast enough. Warning message will tell how many pgs are affected. Signed-off-by: Piotr Dałek (cherry picked from commit 8412a65e0e6f610fb39430d8f65e561b6dbda13f) --- src/common/legacy_config_opts.h | 1 + src/common/options.cc | 5 ++++ src/mon/PGMap.cc | 44 +++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 1168ba78344c..a36122f561c8 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -291,6 +291,7 @@ OPTION(mon_osd_reporter_subtree_level , OPT_STR) // in which level of parent b OPTION(mon_osd_force_trim_to, OPT_INT) // force mon to trim maps to this point, regardless of min_last_epoch_clean (dangerous) OPTION(mon_mds_force_trim_to, OPT_INT) // force mon to trim mdsmaps to this point (dangerous) OPTION(mon_mds_skip_sanity, OPT_BOOL) // skip safety assertions on FSMap (in case of bugs where we want to continue anyway) +OPTION(mon_osd_snap_trim_queue_warn_on, OPT_INT) // monitor debug options OPTION(mon_debug_deprecated_as_obsolete, OPT_BOOL) // consider deprecated commands as obsolete diff --git a/src/common/options.cc b/src/common/options.cc index 90098d82322c..fb7a1ad6d022 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1294,6 +1294,11 @@ std::vector