From: Sage Weil Date: Thu, 11 Feb 2010 17:25:59 +0000 (-0800) Subject: mon: print caps to debug log X-Git-Tag: v0.19~52 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a2e5badb67b42c95eb61374f2ac1ad2e50bf7bb;p=ceph.git mon: print caps to debug log --- diff --git a/src/mon/MonCaps.cc b/src/mon/MonCaps.cc index ae677a5be321..3a4a6d3af02a 100644 --- a/src/mon/MonCaps.cc +++ b/src/mon/MonCaps.cc @@ -87,6 +87,7 @@ bool MonCaps::parse(bufferlist::iterator& iter) try { ::decode(s, iter); + text = s; generic_dout(0) << "decoded caps: " << s << dendl; diff --git a/src/mon/MonCaps.h b/src/mon/MonCaps.h index 8fbc6a9fe6c4..7d8d18ae872a 100644 --- a/src/mon/MonCaps.h +++ b/src/mon/MonCaps.h @@ -34,6 +34,7 @@ struct MonServiceCap { }; class MonCaps { + string text; rwx_t default_action; map services_map; bool get_next_token(string s, size_t& pos, string& token); @@ -42,6 +43,7 @@ class MonCaps { bool allow_all; public: MonCaps() : default_action(0), allow_all(false) {} + const string& get_str() { return text; } bool parse(bufferlist::iterator& iter); rwx_t get_caps(int service); void set_allow_all(bool allow) { allow_all = allow; } diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 7d62d4b87384..79009a591e4e 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -537,6 +537,10 @@ bool Monitor::ms_dispatch(Message *m) } } src_is_mon = !connection || (connection->get_peer_type() & CEPH_ENTITY_TYPE_MON); + + if (s) + dout(20) << " caps " << s->caps.get_str() << dendl; + #define ALLOW_CAPS(service_id, allow_caps) \ do { \ if (src_is_mon) \