]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: use debug_mds for most subsys 15052/head
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 24 Apr 2017 22:06:16 +0000 (18:06 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 11 May 2017 14:49:54 +0000 (10:49 -0400)
DOUT_COND was obsoleted by f41887e38d70970f4d0181fb73e835ece68cee6c.

Balancer and Mantle use a dout hack to continue working since we will probably
specifically want very verbose balancer output in the future.

Fixes: http://tracker.ceph.com/issues/19734
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
doc/rados/troubleshooting/log-and-debug.rst
src/common/dout.h
src/mds/Locker.cc
src/mds/MDBalancer.cc
src/mds/MDLog.cc
src/mds/Migrator.cc
src/mds/journal.cc

index dabe8412a849505862b7c80e244ac8b13ab9f117..757dfb178e929f0693419d6a1c2785a5379ba615 100644 (file)
@@ -88,8 +88,6 @@ particular daemons are set under the daemon section in your configuration file
        [mds]
                debug mds = 1
                debug mds balancer = 1
-               debug mds log = 1
-               debug mds migrator = 1
 
 
 See `Subsystem, Log and Debug Settings`_ for details.
@@ -171,7 +169,7 @@ as ``debug ms = 1/5``. For example:
 
        debug {subsystem} = {log-level}/{memory-level}
        #for example
-       debug mds log = 1/20
+       debug mds balancer = 1/20
 
 
 The following table provides a list of Ceph subsystems and their default log and
index 9f715bf501b3b923255e78b77de36b8e016e1f0c..d2340c9364ccc0c35a1d2df1579b3b6694fc4c88 100644 (file)
@@ -77,9 +77,11 @@ public:
 
 // NOTE: depend on magic value in _ASSERT_H so that we detect when
 // /usr/include/assert.h clobbers our fancier version.
-#define dendl std::flush;                              \
+#define dendl_impl std::flush;                         \
   _ASSERT_H->_log->submit_entry(_dout_e);              \
     }                                          \
   } while (0)
 
+#define dendl dendl_impl
+
 #endif
index cd6ed93bcd71baed1c4650c9c18ead4fe5e61c65..d50650b6384050cdf1c37353be84eb9b9531f8ca 100644 (file)
@@ -47,8 +47,6 @@
 
 #define dout_subsys ceph_subsys_mds
 #undef dout_prefix
-#undef DOUT_COND
-#define DOUT_COND(cct, l) l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_locker
 #define dout_context g_ceph_context
 #define dout_prefix _prefix(_dout, mds)
 static ostream& _prefix(std::ostream *_dout, MDSRank *mds) {
index cb9c1f32f606072f1d1fea2b9a5c95970d844283..192dc9d02ec044eb3aed5c0b0cfe58aa4e457a52 100644 (file)
@@ -41,10 +41,19 @@ using std::vector;
 
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_mds
-#undef DOUT_COND
-#define DOUT_COND(cct, l) l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_balancer
 #undef dout_prefix
 #define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".bal "
+#undef dout
+#define dout(lvl) \
+  do {\
+    auto subsys = ceph_subsys_mds;\
+    if ((dout_context)->_conf->subsys.should_gather(ceph_subsys_mds_balancer, lvl)) {\
+      subsys = ceph_subsys_mds_balancer;\
+    }\
+    dout_impl(dout_context, subsys, lvl) dout_prefix
+#undef dendl
+#define dendl dendl_impl; } while (0)
+
 
 #define MIN_LOAD    50   //  ??
 #define MIN_REEXPORT 5  // will automatically reexport
@@ -61,7 +70,7 @@ int MDBalancer::proc_message(Message *m)
     break;
 
   default:
-    derr << " balancer unknown message " << m->get_type() << dendl;
+    dout(0) << " balancer unknown message " << m->get_type() << dendl;
     assert(0 == "balancer unknown message");
   }
 
@@ -205,7 +214,7 @@ mds_load_t MDBalancer::get_load(utime_t now)
   if (cpu.is_open())
     cpu >> load.cpu_load_avg;
   else
-    derr << "input file " PROCPREFIX "'/proc/loadavg' not found" << dendl;
+    dout(0) << "input file " PROCPREFIX "'/proc/loadavg' not found" << dendl;
   
   dout(15) << "get_load " << load << dendl;
   return load;
index 7b2826e97007610f8c51babeea6d5b94965fd594..f02489fd176cdd4d66097012d316642918de1b81 100644 (file)
@@ -33,8 +33,6 @@
 
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_mds
-#undef DOUT_COND
-#define DOUT_COND(cct, l) l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log
 #undef dout_prefix
 #define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".log "
 
index 140a615925451dbfb9995b39124a973a620e9719..67796cf5a214ecf4d85316fe06685d26629c9c6e 100644 (file)
@@ -78,8 +78,6 @@
 
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_mds
-#undef DOUT_COND
-#define DOUT_COND(cct, l) (l <= cct->_conf->debug_mds || l <= cct->_conf->debug_mds_migrator)
 #undef dout_prefix
 #define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".migrator "
 
index 53dd3f466f131bfed54df59d8510eada640bd121..a28491547217f0f14e6a0900bf627754096fbf68 100644 (file)
@@ -54,9 +54,6 @@
 
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_mds
-#undef DOUT_COND
-#define DOUT_COND(cct, l) (l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log \
-                             || l <= cct->_conf->debug_mds_log_expire)
 #undef dout_prefix
 #define dout_prefix *_dout << "mds." << mds->get_nodeid() << ".journal "
 
@@ -298,9 +295,6 @@ void LogSegment::try_to_expire(MDSRank *mds, MDSGatherBuilder &gather_bld, int o
   }
 }
 
-#undef DOUT_COND
-#define DOUT_COND(cct, l) (l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log)
-
 
 // -----------------------
 // EMetaBlob