]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon: fix `osd out` clog message
authorJohn Spray <john.spray@redhat.com>
Wed, 6 Sep 2017 16:57:40 +0000 (12:57 -0400)
committerJohn Spray <john.spray@redhat.com>
Wed, 6 Sep 2017 17:01:57 +0000 (19:01 +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>
src/mon/OSDMonitor.cc

index fdf004bfb65c75ce0c1c0489ecfcb935fc8ac892..62a9dc2b424242a0bbf581126969dd4d564cc387 100644 (file)
@@ -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";
             }