From: Mauricio Faria de Oliveira Date: Thu, 7 Jan 2021 22:44:44 +0000 (-0300) Subject: osd: add osd_fast_shutdown_notify_mon option (default false) X-Git-Tag: v17.1.0~2769^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c75734729764868c5c501722fc8de08dac9ebd4a;p=ceph.git osd: add osd_fast_shutdown_notify_mon option (default false) The osd_fast_shutdown option may cause the cluster log to receive too many entries of 'osd.X reported immediately failed by osd.Y', depending on cluster scale. This might be an issue for LMA stacks/tools that check ceph logs for failed lines, and then require additional logic to filter on an intended OSD (fast) shutdown; might not be an option/possible, and require an admin to analyze. So, add osd_fast_shutdown_notify_mon option for OSD to also tell the monitor it is shutting down (done in slow/non-fast shutdown) under osd_fast_shutdown. This introduces minimal delay (the ack from the mon is required to prevent the messages), and addresses the cluster log issue. Note: the osd_mon_shutdown_timeout option can be used to control the maximum amount of time waiting for the monitor ack to arrive. Fixes: http://tracker.ceph.com/issues/46978 Signed-off-by: Mauricio Faria de Oliveira --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index d30c5fda8a98..21e1dcf71dcb 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -760,6 +760,7 @@ OPTION(osd_op_history_slow_op_threshold, OPT_DOUBLE) // track the op if over thi OPTION(osd_target_transaction_size, OPT_INT) // to adjust various transactions that batch smaller items OPTION(osd_failsafe_full_ratio, OPT_FLOAT) // what % full makes an OSD "full" (failsafe) OPTION(osd_fast_shutdown, OPT_BOOL) +OPTION(osd_fast_shutdown_notify_mon, OPT_BOOL) // tell mon the OSD is shutting down on osd_fast_shutdown OPTION(osd_fast_fail_on_connection_refused, OPT_BOOL) // immediately mark OSDs as down once they refuse to accept connections OPTION(osd_pg_object_context_cache_count, OPT_INT) diff --git a/src/common/options.cc b/src/common/options.cc index 8e15babf9e3c..e17822d16a77 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3711,6 +3711,12 @@ std::vector