From 5f83a6158b29944cf8f5a069c50edba3e172cdcc Mon Sep 17 00:00:00 2001 From: David Zafman Date: Wed, 4 Sep 2019 17:13:32 +0000 Subject: [PATCH] osd doc mon mgr: To milliseconds for config value, user input and threshold out Signed-off-by: David Zafman --- PendingReleaseNotes | 2 +- doc/rados/configuration/mon-config-ref.rst | 2 +- qa/standalone/misc/network-ping.sh | 18 ++++++++++++------ src/common/options.cc | 6 +++--- src/mgr/ClusterState.cc | 8 ++++++-- src/mon/PGMap.cc | 3 ++- src/osd/OSD.cc | 8 ++++++-- 7 files changed, 31 insertions(+), 16 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 9c7a3b302949f..71aa7e232bf35 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -116,7 +116,7 @@ option ``mon_warn_on_slow_ping_ratio`` specifies a percentage of ``osd_heartbeat_grace`` to determine the threshold. A value of zero disables the warning. New configuration option - ``mon_warn_on_slow_ping_time`` specified in microseconds over-rides the + ``mon_warn_on_slow_ping_time`` specified in milliseconds over-rides the computed value, causes a warning when OSD heartbeat pings take longer than the specified amount. New admin command ``ceph daemon mgr.# dump_osd_network [threshold]`` command will diff --git a/doc/rados/configuration/mon-config-ref.rst b/doc/rados/configuration/mon-config-ref.rst index c88df3ea832eb..b167a8e1aef11 100644 --- a/doc/rados/configuration/mon-config-ref.rst +++ b/doc/rados/configuration/mon-config-ref.rst @@ -407,7 +407,7 @@ by setting it in the ``[mon]`` section of the configuration file. :Description: Override ``mon warn on slow ping ratio`` with a specific value. Issue a ``HEALTH_WARN`` in cluster log if any heartbeat between OSDs exceeds ``mon warn on slow ping time`` - microseconds. The default is 0 (disabled). + milliseconds. The default is 0 (disabled). :Type: Integer :Default: ``0`` diff --git a/qa/standalone/misc/network-ping.sh b/qa/standalone/misc/network-ping.sh index 5ddbd1241bd06..15f2e68dabe44 100755 --- a/qa/standalone/misc/network-ping.sh +++ b/qa/standalone/misc/network-ping.sh @@ -43,11 +43,11 @@ function TEST_network_ping_test1() { CEPH_ARGS='' ceph daemon $(get_asok_path osd.0) dump_osd_network | tee $dir/json test "$(cat $dir/json | jq '.entries | length')" = "0" || return 1 - test "$(cat $dir/json | jq '.threshold')" = "1000000" || return 1 + test "$(cat $dir/json | jq '.threshold')" = "1000" || return 1 CEPH_ARGS='' ceph daemon $(get_asok_path mgr.x) dump_osd_network | tee $dir/json test "$(cat $dir/json | jq '.entries | length')" = "0" || return 1 - test "$(cat $dir/json | jq '.threshold')" = "1000000" || return 1 + test "$(cat $dir/json | jq '.threshold')" = "1000" || return 1 CEPH_ARGS='' ceph daemon $(get_asok_path osd.0) dump_osd_network 0 | tee $dir/json test "$(cat $dir/json | jq '.entries | length')" = "4" || return 1 @@ -62,11 +62,11 @@ function TEST_network_ping_test1() { flush_pg_stats CEPH_ARGS='' ceph daemon $(get_asok_path osd.0) dump_osd_network | tee $dir/json test "$(cat $dir/json | jq '.entries | length')" = "0" || return 1 - test "$(cat $dir/json | jq '.threshold')" = "1000000" || return 1 + test "$(cat $dir/json | jq '.threshold')" = "1000" || return 1 CEPH_ARGS='' ceph daemon $(get_asok_path mgr.x) dump_osd_network | tee $dir/json test "$(cat $dir/json | jq '.entries | length')" = "0" || return 1 - test "$(cat $dir/json | jq '.threshold')" = "1000000" || return 1 + test "$(cat $dir/json | jq '.threshold')" = "1000" || return 1 CEPH_ARGS='' ceph daemon $(get_asok_path osd.0) dump_osd_network 0 | tee $dir/json test "$(cat $dir/json | jq '.entries | length')" = "4" || return 1 @@ -82,11 +82,11 @@ function TEST_network_ping_test1() { flush_pg_stats CEPH_ARGS='' ceph daemon $(get_asok_path osd.0) dump_osd_network | tee $dir/json test "$(cat $dir/json | jq '.entries | length')" = "0" || return 1 - test "$(cat $dir/json | jq '.threshold')" = "1000000" || return 1 + test "$(cat $dir/json | jq '.threshold')" = "1000" || return 1 CEPH_ARGS='' ceph daemon $(get_asok_path mgr.x) dump_osd_network | tee $dir/json test "$(cat $dir/json | jq '.entries | length')" = "0" || return 1 - test "$(cat $dir/json | jq '.threshold')" = "1000000" || return 1 + test "$(cat $dir/json | jq '.threshold')" = "1000" || return 1 CEPH_ARGS='' ceph daemon $(get_asok_path osd.0) dump_osd_network 0 | tee $dir/json test "$(cat $dir/json | jq '.entries | length')" = "4" || return 1 @@ -96,6 +96,12 @@ function TEST_network_ping_test1() { test "$(cat $dir/json | jq '.entries | length')" = "12" || return 1 test "$(cat $dir/json | jq '.threshold')" = "0" || return 1 + # Just check the threshold output matches the input + CEPH_ARGS='' ceph daemon $(get_asok_path mgr.x) dump_osd_network 99 | tee $dir/json + test "$(cat $dir/json | jq '.threshold')" = "99" || return 1 + CEPH_ARGS='' ceph daemon $(get_asok_path osd.0) dump_osd_network 98 | tee $dir/json + test "$(cat $dir/json | jq '.threshold')" = "98" || return 1 + rm -f $dir/json } diff --git a/src/common/options.cc b/src/common/options.cc index 48ad67ed06189..07dc193f3e9cb 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1712,13 +1712,13 @@ std::vector