Bug #19734
mds: subsystems like ceph_subsys_mds_balancer do not log correctly
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:
0%
Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Our logging for subsystems is relying on a removed configuration macro:
$ git grep DOUT_COND Locker.cc:#undef DOUT_COND Locker.cc:#define DOUT_COND(cct, l) l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_locker MDBalancer.cc:#undef DOUT_COND MDBalancer.cc:#define DOUT_COND(cct, l) l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_balancer MDLog.cc:#undef DOUT_COND MDLog.cc:#define DOUT_COND(cct, l) l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log Migrator.cc:#undef DOUT_COND Migrator.cc:#define DOUT_COND(cct, l) (l <= cct->_conf->debug_mds || l <= cct->_conf->debug_mds_migrator) journal.cc:#undef DOUT_COND journal.cc:#define DOUT_COND(cct, l) (l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log \ journal.cc:#undef DOUT_COND journal.cc:#define DOUT_COND(cct, l) (l<=cct->_conf->debug_mds || l <= cct->_conf->debug_mds_log)
That DOUT_COND macro was removed in f41887e38d70970f4d0181fb73e835ece68cee6c back in 2012.
There's no easy way AFAICT to get the old intent without some awkward macro magic, which I did while fixing Mantle in https://github.com/ceph/ceph/pull/14704. That looks like:
#define dout_context g_ceph_context #define dout_subsys ceph_subsys_mds_balancer #undef dout_prefix #define dout_prefix *_dout << "mds.mantle " #define mantle_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 #define mantle_dendl dendl; } while (0)
Should we apply that for the other subsystems?
History
#1 Updated by John Spray almost 7 years ago
- Status changed from New to Resolved