From 0dca240b8c4ef4ce17534fda302f1c498689d915 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Fri, 12 Mar 2010 15:45:31 -0800 Subject: [PATCH] mon: add warning/debugging prints to prepare_new_pool --- src/mon/OSDMonitor.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index cbfeca079d459..c36a88e4317b4 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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) { -- 2.39.5