]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: print mdsmap processed at low debug level 23212/head
authorPatrick Donnelly <pdonnell@redhat.com>
Sun, 15 Jul 2018 23:10:35 +0000 (16:10 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 24 Jul 2018 19:07:28 +0000 (12:07 -0700)
Production deployments use low debugging but it'd be useful to always know what
MDSMap epoch the MDS is currently processing. (In the case of skipped epochs or
unsynchronized processing.)

Fixes: https://tracker.ceph.com/issues/24852
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 3820cf897a9f19978bba769a5be0f4b5fc1b67ee)

Conflicts:
src/mds/MDSDaemon.cc

src/mds/MDSDaemon.cc

index 452d5bbf6602be0125b1b629a084790380251b82..ee3845b9c54e5aa116acd0b5cf3a447c9e34fec5 100644 (file)
@@ -863,16 +863,17 @@ out:
 void MDSDaemon::handle_mds_map(MMDSMap *m)
 {
   version_t epoch = m->get_epoch();
-  dout(5) << "handle_mds_map epoch " << epoch << " from " << m->get_source() << dendl;
 
   // is it new?
   if (epoch <= mdsmap->get_epoch()) {
-    dout(5) << " old map epoch " << epoch << " <= " << mdsmap->get_epoch()
-           << ", discarding" << dendl;
+    dout(5) << "handle_mds_map old map epoch " << epoch << " <= "
+            << mdsmap->get_epoch() << ", discarding" << dendl;
     m->put();
     return;
   }
 
+  dout(1) << "Updating MDS map to version " << epoch << " from " << m->get_source() << dendl;
+
   entity_addr_t addr;
 
   // keep old map, for a moment
@@ -931,7 +932,7 @@ void MDSDaemon::handle_mds_map(MMDSMap *m)
         if (mds_gid_t existing = mdsmap->find_mds_gid_by_name(name)) {
           const MDSMap::mds_info_t& i = mdsmap->get_info_gid(existing);
           if (i.global_id > myid) {
-            dout(1) << "map replaced me with another mds." << whoami
+            dout(1) << "Map replaced me with another mds." << whoami
                     << " with gid (" << i.global_id << ") larger than myself ("
                     << myid << "); quitting!" << dendl;
             // Call suicide() rather than respawn() because if someone else
@@ -944,7 +945,7 @@ void MDSDaemon::handle_mds_map(MMDSMap *m)
         }
       }
 
-      dout(1) << "map removed me (mds." << whoami << " gid:"
+      dout(1) << "Map removed me (mds." << whoami << " gid:"
               << myid << ") from cluster due to lost contact; respawning" << dendl;
       respawn();
     }
@@ -992,7 +993,7 @@ void MDSDaemon::_handle_mds_map(MDSMap *oldmap)
   // Normal rankless case, we're marked as standby
   if (new_state == MDSMap::STATE_STANDBY) {
     beacon.set_want_state(mdsmap, new_state);
-    dout(1) << "handle_mds_map standby" << dendl;
+    dout(1) << "Map has assigned me to become a standby" << dendl;
 
     return;
   }
@@ -1032,7 +1033,7 @@ void MDSDaemon::suicide()
   assert(stopping == false);
   stopping = true;
 
-  dout(1) << "suicide.  wanted state "
+  dout(1) << "suicide! Wanted state "
           << ceph_mds_state_name(beacon.get_want_state()) << dendl;
 
   if (tick_event) {
@@ -1071,7 +1072,7 @@ void MDSDaemon::suicide()
 
 void MDSDaemon::respawn()
 {
-  dout(1) << "respawn" << dendl;
+  dout(1) << "respawn!" << dendl;
 
   char *new_argv[orig_argc+1];
   dout(1) << " e: '" << orig_argv[0] << "'" << dendl;