rot_inc.op = KeyServerData::AUTH_INC_SET_ROTATING;
if (!mon->key_server.updated_rotating(rot_inc.rotating_bl, last_rotating_ver))
return;
- dout(0) << "AuthMonitor::tick() updated rotating, now calling propose_pending" << dendl;
+ dout(10) << "AuthMonitor::tick() updated rotating, now calling propose_pending" << dendl;
push_cephx_inc(rot_inc);
propose_pending();
}
void AuthMonitor::on_active()
{
- dout(0) << "AuthMonitor::on_active()" << dendl;
+ dout(10) << "AuthMonitor::on_active()" << dendl;
if (!mon->is_leader())
return;
void AuthMonitor::create_initial(bufferlist& bl)
{
- dout(0) << "create_initial -- creating initial map" << dendl;
+ dout(10) << "create_initial -- creating initial map" << dendl;
if (g_conf.keyring) {
- dout(0) << "reading initial keyring " << dendl;
+ dout(10) << "reading initial keyring " << dendl;
bufferlist bl;
string k = g_conf.keyring;
bool AuthMonitor::update_from_paxos()
{
- dout(0) << "AuthMonitor::update_from_paxos()" << dendl;
+ dout(10) << "AuthMonitor::update_from_paxos()" << dendl;
version_t paxosv = paxos->get_version();
version_t keys_ver = mon->key_server.get_ver();
if (paxosv == keys_ver) return true;
assert(mon->is_leader());
max_global_id += g_conf.mon_globalid_prealloc;
- dout(0) << "increasing max_global_id to " << max_global_id << dendl;
+ dout(10) << "increasing max_global_id to " << max_global_id << dendl;
Incremental inc;
inc.inc_type = GLOBAL_ID;
inc.max_global_id = max_global_id;
version_t paxosv = paxos->get_version();
version_t keys_ver = mon->key_server.get_ver();
- dout(0) << "AuthMonitor::init() paxosv=" << paxosv << dendl;
+ dout(10) << "AuthMonitor::init() paxosv=" << paxosv << dendl;
if (paxosv == keys_ver) return;
assert(paxosv >= keys_ver);
bufferlist latest;
version_t v = paxos->get_latest(latest);
if (v) {
- dout(0) << "AuthMonitor::init() startup: loading summary e" << v << dendl;
+ dout(10) << "AuthMonitor::init() startup: loading summary e" << v << dendl;
bufferlist::iterator p = latest.begin();
__u8 v;
::decode(v, p);
bool AuthMonitor::preprocess_query(PaxosServiceMessage *m)
{
- dout(0) << "preprocess_query " << *m << " from " << m->get_orig_source_inst() << dendl;
+ dout(10) << "preprocess_query " << *m << " from " << m->get_orig_source_inst() << dendl;
switch (m->get_type()) {
case MSG_MON_COMMAND:
return preprocess_command((MMonCommand*)m);
bool AuthMonitor::prep_auth(MAuth *m, bool paxos_writable)
{
- dout(0) << "prep_auth() blob_size=" << m->get_auth_payload().length() << dendl;
+ dout(10) << "prep_auth() blob_size=" << m->get_auth_payload().length() << dendl;
MonSession *s = (MonSession *)m->get_connection()->get_priv();
if (!s) {
::decode(entity_name, indata);
::decode(s->global_id, indata);
} catch (buffer::error *e) {
- dout(0) << "failed to decode initial auth message" << dendl;
+ dout(10) << "failed to decode initial auth message" << dendl;
ret = -EINVAL;
goto reply;
}
}
start = true;
} else if (!s->auth_handler) {
- dout(0) << "protocol specified but no s->auth_handler" << dendl;
+ dout(10) << "protocol specified but no s->auth_handler" << dendl;
ret = -EINVAL;
goto reply;
}
}
bufferlist bl = m->get_data();
- dout(0) << "AuthMonitor::prepare_command bl.length()=" << bl.length() << dendl;
+ dout(10) << "AuthMonitor::prepare_command bl.length()=" << bl.length() << dendl;
bufferlist::iterator iter = bl.begin();
KeyRing keyring;
try {
char store_name[len];
snprintf(store_name, len, "%s.%s.%s", info.name.c_str(), info.version.str(), info.version.arch());
- dout(0) << "storing inc.impl length=" << impl.binary.length() << dendl;
+ dout(10) << "storing inc.impl length=" << impl.binary.length() << dendl;
bufferlist bl;
::encode(impl.binary, bl);
::encode(info, bl);
mon->store->put_bl_ss(bl, "class_impl", store_name);
- dout(0) << "adding name=" << info.name << " version=" << info.version << " store_name=" << store_name << dendl;
+ dout(10) << "adding name=" << info.name << " version=" << info.version << " store_name=" << store_name << dendl;
return true;
}
dout(10) << "prepare_class " << *m << " from " << m->get_orig_source() << dendl;
if (ceph_fsid_compare(&m->fsid, &mon->monmap->fsid)) {
- dout(0) << "handle_class on fsid " << m->fsid << " != " << mon->monmap->fsid << dendl;
+ dout(10) << "handle_class on fsid " << m->fsid << " != " << mon->monmap->fsid << dendl;
m->put();
return false;
}
bufferlist::iterator iter = bl.begin();
::decode(prev_bin, iter);
/* check to see whether we should store it */
- dout(0) << "class name exists" << dendl;
+ dout(10) << "class name exists" << dendl;
if (excl_opt) {
- dout(0) << "excl flag, not overwriting" << dendl;
+ dout(10) << "excl flag, not overwriting" << dendl;
should_store = false;
} else if (changed_opt) {
if (prev_bin.length() == impl.binary.length() &&
memcmp(impl.binary.c_str(), prev_bin.c_str(), prev_bin.length()) == 0) {
- dout(0) << "class content has not changed, not doing anything" << dendl;
+ dout(10) << "class content has not changed, not doing anything" << dendl;
should_store = false;
} else {
- dout(0) << "class content changed, will keep newer version" << dendl;
+ dout(10) << "class content changed, will keep newer version" << dendl;
}
}
}
ClassLibraryIncremental inc;
if (should_store) {
- dout(0) << "payload.length=" << m->get_data().length() << dendl;
+ dout(10) << "payload.length=" << m->get_data().length() << dendl;
info.name = name;
info.version = cv;
dout(0) << "storing class " << name << " v" << info.version << dendl;
int len = (*p).name.length() + 16;
int bin_len;
char store_name[len];
- dout(0) << "got CLASS_GET name=" << (*p).name << " ver=" << (*p).version << dendl;
+ dout(10) << "got CLASS_GET name=" << (*p).name << " ver=" << (*p).version << dendl;
snprintf(store_name, len, "%s.%s.%s", (*p).name.c_str(), ver.str(), ver.arch());
bufferlist bl;
bin_len = mon->store->get_bl_ss(bl, "class_impl", store_name);
assert(bin_len > 0);
bufferlist::iterator iter = bl.begin();
::decode(impl.binary, iter);
- dout(0) << "replying with name=" << (*p).name << " version=" << ver << " store_name=" << store_name << dendl;
+ dout(10) << "replying with name=" << (*p).name << " version=" << ver << " store_name=" << store_name << dendl;
list.add((*p).name, ver);
reply->add.push_back(true);
reply->impl.push_back(impl);
break;
case CLASS_SET:
{
- dout(0) << "ClassMonitor::handle_request() CLASS_SET" << dendl;
+ dout(10) << "ClassMonitor::handle_request() CLASS_SET" << dendl;
bool add = *add_iter;
ClassVersionMap& cv = list.library_map[(*p).name];
ClassInfo entry;
const char *t = token.c_str();
int val = 0;
- generic_dout(0) << "got token=" << token << dendl;
+ generic_dout(10) << "got token=" << token << dendl;
while (*t) {
switch (*t) {
}
t++;
}
- generic_dout(0) << "return val=" << val << dendl;
+ generic_dout(10) << "return val=" << val << dendl;
if (val)
cap_val = val;
::decode(s, iter);
text = s;
- generic_dout(0) << "decoded caps: " << s << dendl;
+ generic_dout(10) << "decoded caps: " << s << dendl;
size_t pos = 0;
string token;
return false;
}
- generic_dout(0) << "default=" << (int)default_action << dendl;
+ generic_dout(10) << "default=" << (int)default_action << dendl;
map<int, MonCap>::iterator it;
for (it = services_map.begin(); it != services_map.end(); ++it) {
- generic_dout(0) << it->first << " -> (" << (int)it->second.allow << "." << (int)it->second.deny << ")" << dendl;
+ generic_dout(10) << it->first << " -> (" << (int)it->second.allow << "." << (int)it->second.deny << ")" << dendl;
}
return true;
string rs;
int r = -EINVAL;
if (!m->cmd.empty()) {
- dout(0) << "m->cmd[0]=" << m->cmd[0] << dendl;
if (m->cmd[0] == "mds") {
mdsmon()->dispatch(m);
return;
void Monitor::check_sub(Subscription *sub)
{
- dout(0) << "check_sub monmap next " << sub->next << " have " << monmap->get_epoch() << dendl;
+ dout(10) << "check_sub monmap next " << sub->next << " have " << monmap->get_epoch() << dendl;
if (sub->next <= monmap->get_epoch()) {
send_latest_monmap(sub->session->inst);
if (sub->onetime)
if (!session)
goto done;
if (!session->caps.check_privileges(PAXOS_OSDMAP, MON_CAP_X)) {
- dout(0) << "MClass received from entity without sufficient privileges "
+ dout(1) << "MClass received from entity without sufficient privileges "
<< session->caps << dendl;
goto done;
}
return;
case CLASS_RESPONSE:
- dout(0) << "got a class response (" << *m << ") ???" << dendl;
+ dout(10) << "got a class response (" << *m << ") ???" << dendl;
break;
default:
- dout(0) << "got an unknown class message (" << *m << ") ???" << dendl;
+ dout(10) << "got an unknown class message (" << *m << ") ???" << dendl;
break;
}
bool OSDMonitor::preprocess_pool_op(MPoolOp *m)
{
- dout(0) << "m->op=" << m->op << dendl;
+ dout(10) << "m->op=" << m->op << dendl;
if (m->op == POOL_OP_CREATE) {
return preprocess_pool_op_create(m);
}
}
bool snap_exists = false;
pg_pool_t *pp = 0;
- if (pending_inc.new_pools.count(m->pool)) pp = &pending_inc.new_pools[m->pool];
- //check if the snap and snapname exists
+ if (pending_inc.new_pools.count(m->pool))
+ pp = &pending_inc.new_pools[m->pool];
+ // check if the snap and snapname exists
if (!osdmap.get_pg_pool(m->pool)) {
- //uh-oh, bad pool num!
- dout(0) << "attempt to delete non-existent pool id " << m->pool << dendl;
+ // uh-oh, bad pool num!
+ dout(10) << "attempt to delete non-existent pool id " << m->pool << dendl;
_pool_op(m, -ENODATA, pending_inc.epoch);
return true;
}
inc.decode(p);
pg_map.apply_incremental(inc);
- dout(0) << pg_map << dendl;
+ dout(10) << pg_map << dendl;
if (inc.pg_scan)
last_sent_pg_create.clear(); // reset pg_create throttle timer
MonSession(entity_inst_t i) : inst(i), closed(false), item(this),
global_id(0), notified_global_id(0), auth_handler(NULL) {}
~MonSession() {
- generic_dout(0) << "~MonSession " << this << dendl;
+ //generic_dout(0) << "~MonSession " << this << dendl;
// we should have been removed before we get destructed; see MonSessionMap::remove_session()
assert(!item.is_on_list());
assert(sub_map.empty());