From: David Zafman Date: Wed, 4 Sep 2019 17:13:32 +0000 (+0000) Subject: osd doc mon mgr: To milliseconds for config value, user input and threshold out X-Git-Tag: v13.2.7~26^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e67af73d9db387c92a3aaa606a8bc59c68fab29c;p=ceph.git osd doc mon mgr: To milliseconds for config value, user input and threshold out Signed-off-by: David Zafman (cherry picked from commit 5f83a6158b29944cf8f5a069c50edba3e172cdcc) Conflicts: src/common/options.cc (trivial) --- diff --git a/PendingReleaseNotes b/PendingReleaseNotes index a20f36098f8b..a9c0e8dc260a 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -17,7 +17,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 a84f459585f4..01432c3f3525 100644 --- a/doc/rados/configuration/mon-config-ref.rst +++ b/doc/rados/configuration/mon-config-ref.rst @@ -409,7 +409,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 5ddbd1241bd0..15f2e68dabe4 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 315f47d86176..d85a581958af 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1468,13 +1468,13 @@ std::vector