From: John Spray Date: Wed, 6 Sep 2017 16:57:40 +0000 (-0400) Subject: mon: fix `osd out` clog message X-Git-Tag: ses5-gm~5^2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F17862%2Fhead;p=ceph.git mon: fix `osd out` clog message This was printing the absolute time instead of the period. Fixes: http://tracker.ceph.com/issues/21249 Signed-off-by: John Spray (cherry picked from commit f07480fec729d66f4cdc19a1c3bde3d185df1289) --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 46f702f4023e..f7ba39746fff 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -9032,7 +9032,8 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, if (osdmap.is_up(osd)) { msg << ", while it was still marked up"; } else { - msg << ", after it was down for " << int(down_pending_out[osd].sec()) + auto period = ceph_clock_now() - down_pending_out[osd]; + msg << ", after it was down for " << int(period.sec()) << " seconds"; }