]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: add warning/debugging prints to prepare_new_pool
authorGreg Farnum <gregf@hq.newdream.net>
Fri, 12 Mar 2010 23:45:31 +0000 (15:45 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Mon, 15 Mar 2010 17:40:34 +0000 (10:40 -0700)
src/mon/OSDMonitor.cc

index cbfeca079d459b5b96865df2c5201b59f6c7c084..c36a88e4317b418189301a2fbb0a37c2f7e2d906 100644 (file)
@@ -1010,11 +1010,19 @@ int OSDMonitor::prepare_new_pool(MPoolOp *m)
   if (m->auid) {
     if(session->caps.check_privileges(PAXOS_OSDMAP, MON_CAP_W, m->auid)) {
       prepare_new_pool(m->name, m->auid);
-    } else return -EPERM;
+    } else {
+      dout(5) << "attempt to create new pool without sufficient auid privileges!"
+             << *m << dendl;
+      return -EPERM;
+    }
   } else {
     if (session->caps.check_privileges(PAXOS_OSDMAP, MON_CAP_W)) {
       prepare_new_pool(m->name, session->caps.auid);
-    } else return -EPERM;
+    } else {
+      dout(5) << "attempt to create new pool without sufficient caps!"
+             << *m << dendl;
+      return -EPERM;
+    }
   }
   return 0;
 }
@@ -1354,6 +1362,7 @@ bool OSDMonitor::preprocess_pool_op_create ( MPoolOp *m)
 
 bool OSDMonitor::prepare_pool_op (MPoolOp *m)
 {
+  dout(10) << "prepare_pool_op " << m << dendl;
   if (m->op == POOL_OP_CREATE) {
     return prepare_pool_op_create(m);
   } else if (m->op == POOL_OP_DELETE) {