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: v14.2.5~117^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b8e150ed371f75c869718cb0797a8496fa4e609f;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 aa3c36ef5980..cb764db5aaa0 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -32,7 +32,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 2b541d022d76..2b48ad81c0b1 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 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 97e01243d31c..05bbcd25cf5e 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1732,13 +1732,13 @@ std::vector