]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrMonitor: show delta
authorSage Weil <sage@redhat.com>
Thu, 30 Mar 2017 16:31:35 +0000 (12:31 -0400)
committerSage Weil <sage@redhat.com>
Thu, 30 Mar 2017 21:57:35 +0000 (17:57 -0400)
This is mostly because I couldn't debug a weird state where
it kept updating but it appeared the addr was not changing
(always '-').

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MgrMonitor.cc

index e9276cf36404461702587a75712e55cdee7a8f44..cdca72a110d94bef16bb2fd309d50d596e76fc8b 100644 (file)
@@ -202,7 +202,8 @@ bool MgrMonitor::prepare_beacon(MonOpRequestRef op)
   if (pending_map.active_gid == m->get_gid()) {
     // A beacon from the currently active daemon
     if (pending_map.active_addr != m->get_server_addr()) {
-      dout(4) << "learned address " << m->get_server_addr() << dendl;
+      dout(4) << "learned address " << m->get_server_addr()
+             << " (was " << pending_map.active_addr << ")" << dendl;
       pending_map.active_addr = m->get_server_addr();
       updated = true;
     }
@@ -217,10 +218,13 @@ bool MgrMonitor::prepare_beacon(MonOpRequestRef op)
     if (pending_map.standbys.count(m->get_gid())) {
       drop_standby(m->get_gid());
     }
+    dout(4) << "selecting new active " << m->get_gid()
+           << " " << m->get_name()
+           << " (was " << pending_map.active_gid << " "
+           << pending_map.active_name << ")" << dendl;
     pending_map.active_gid = m->get_gid();
     pending_map.active_name = m->get_name();
 
-    dout(4) << "selecting new active in epoch " << pending_map.epoch << dendl;
     updated = true;
   } else {
     if (pending_map.standbys.count(m->get_gid()) > 0) {