]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix `osd out` clog message 17862/head
authorJohn Spray <john.spray@redhat.com>
Wed, 6 Sep 2017 16:57:40 +0000 (12:57 -0400)
committerNathan Cutler <ncutler@suse.com>
Thu, 21 Sep 2017 04:00:50 +0000 (06:00 +0200)
This was printing the absolute time instead of the period.

Fixes: http://tracker.ceph.com/issues/21249
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit f07480fec729d66f4cdc19a1c3bde3d185df1289)

src/mon/OSDMonitor.cc

index 46f702f4023e47810a1d12ba7cbf123a14c92720..f7ba39746fffa81b66abadc980336dd0e5f2e332 100644 (file)
@@ -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";
             }