]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: less log noise
authorSage Weil <sage@newdream.net>
Fri, 10 Sep 2010 20:54:58 +0000 (13:54 -0700)
committerSage Weil <sage@newdream.net>
Fri, 10 Sep 2010 20:54:58 +0000 (13:54 -0700)
src/mon/AuthMonitor.cc
src/mon/ClassMonitor.cc
src/mon/MonCaps.cc
src/mon/Monitor.cc
src/mon/OSDMonitor.cc
src/mon/PGMonitor.cc
src/mon/Session.h

index 5defe7b843740d510c8a3037f52093c94b39cfda..5a285bbbc6561500321b248e6ddd527fbccf0fcf 100644 (file)
@@ -57,7 +57,7 @@ void AuthMonitor::check_rotate()
   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();
 }
@@ -80,7 +80,7 @@ void AuthMonitor::tick()
 
 void AuthMonitor::on_active()
 {
-  dout(0) << "AuthMonitor::on_active()" << dendl;
+  dout(10) << "AuthMonitor::on_active()" << dendl;
 
   if (!mon->is_leader())
     return;
@@ -92,9 +92,9 @@ void AuthMonitor::on_active()
 
 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;
@@ -129,7 +129,7 @@ void AuthMonitor::create_initial(bufferlist& bl)
 
 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;
@@ -203,7 +203,7 @@ void AuthMonitor::increase_max_global_id()
   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;
@@ -220,7 +220,7 @@ void AuthMonitor::init()
   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);
@@ -230,7 +230,7 @@ void AuthMonitor::init()
     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);
@@ -264,7 +264,7 @@ void AuthMonitor::encode_pending(bufferlist &bl)
 
 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);
@@ -352,7 +352,7 @@ uint64_t AuthMonitor::assign_global_id(MAuth *m, bool should_increase_max)
 
 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) {
@@ -381,7 +381,7 @@ bool AuthMonitor::prep_auth(MAuth *m, bool paxos_writable)
       ::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;
     }
@@ -393,7 +393,7 @@ bool AuthMonitor::prep_auth(MAuth *m, bool paxos_writable)
     }
     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;
   }
@@ -584,7 +584,7 @@ bool AuthMonitor::prepare_command(MMonCommand *m)
       }
 
       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 {
index a7a47cfca465954d37f1c24aba06e3725deb5e80..204bcc1386d58567f9729e016234ced06277db38 100644 (file)
@@ -81,12 +81,12 @@ bool ClassMonitor::store_impl(ClassInfo& info, ClassImpl& impl)
   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;
 }
@@ -241,7 +241,7 @@ bool ClassMonitor::prepare_class(MClass *m)
   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;
   }
@@ -365,17 +365,17 @@ bool ClassMonitor::prepare_command(MMonCommand *m)
           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;
             }
           }
         }
@@ -383,7 +383,7 @@ bool ClassMonitor::prepare_command(MMonCommand *m)
 
       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;
@@ -521,14 +521,14 @@ void ClassMonitor::handle_request(MClass *m)
         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);
@@ -538,7 +538,7 @@ void ClassMonitor::handle_request(MClass *m)
       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;
index 1b297d1d6ba3751fce3d8ac0e004b8500b49486a..9460595251f0ef00792080f0e2c72eb29a210471 100644 (file)
@@ -34,7 +34,7 @@ bool MonCaps::is_rwx(string& token, rwx_t& cap_val)
   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) {
@@ -52,7 +52,7 @@ bool MonCaps::is_rwx(string& token, rwx_t& cap_val)
     }
     t++;
   }
-  generic_dout(0) << "return val=" << val << dendl;
+  generic_dout(10) << "return val=" << val << dendl;
 
   if (val)
     cap_val = val;
@@ -89,7 +89,7 @@ bool MonCaps::parse(bufferlist::iterator& iter)
     ::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;
@@ -208,10 +208,10 @@ do { \
     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;
index 68f0079c8d25bc6f1fbbb10567c2fa45428f8678..43120e0a6705371125a4e6a36777f30cc391e558 100644 (file)
@@ -277,7 +277,6 @@ void Monitor::handle_command(MMonCommand *m)
   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;
@@ -840,7 +839,7 @@ void Monitor::check_subs()
 
 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)
@@ -999,7 +998,7 @@ void Monitor::handle_class(MClass *m)
   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;
   }
@@ -1011,11 +1010,11 @@ void Monitor::handle_class(MClass *m)
       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;
   }
 
index 7cb1062d72322e7c32ea8b63f08f192c1d236ac2..d4b29c07e25885ce145fbcb42b906d478dbd551a 100644 (file)
@@ -1475,7 +1475,7 @@ out:
 
 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);
   }
@@ -1486,11 +1486,12 @@ bool OSDMonitor::preprocess_pool_op(MPoolOp *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;
   }
index 42860b7061cf65896df1334ab841fa8994ae2ee4..9e08e067d950007fc963d5a8e53aa7780ab1a813 100644 (file)
@@ -95,7 +95,7 @@ bool PGMonitor::update_from_paxos()
     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
index 0d537d0ddd17bdc585e5e8b8b9d42c498cacdc99..41c970c1d5f6898eaabe5adc762fa6c1dab876dd 100644 (file)
@@ -52,7 +52,7 @@ struct MonSession : public RefCountedObject {
   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());