From f07480fec729d66f4cdc19a1c3bde3d185df1289 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 --- 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 fdf004bfb65c7..62a9dc2b42424 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -9065,7 +9065,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