[mds]
debug mds = 1
debug mds balancer = 1
- debug mds log = 1
- debug mds migrator = 1
See `Subsystem, Log and Debug Settings`_ for details.
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
// 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
#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) {
#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
break;
default:
- derr << " balancer unknown message " << m->get_type() << dendl;
+ dout(0) << " balancer unknown message " << m->get_type() << dendl;
assert(0 == "balancer unknown message");
}
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;
#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 "
#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 "
#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 "
}
}
-#undef DOUT_COND
-#define DOUT_COND(cct, l) (l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log)
-
// -----------------------
// EMetaBlob