From b54c7ba225314cc3e67707ec8dbac4a7f8381929 Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 6 Sep 2017 12:57:40 -0400 Subject: [PATCH] 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) --- src/mon/OSDMonitor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 46f702f4023e4..f7ba39746fffa 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"; } -- 2.39.5