Skip to content

Commit

Permalink
Log output from prepare_new_pool on failure
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Mick <dan.mick@redhat.com>
  • Loading branch information
dmick committed Mar 8, 2016
1 parent 2c23b6a commit 026db92
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/mon/OSDMonitor.cc
Expand Up @@ -4189,16 +4189,21 @@ int OSDMonitor::prepare_new_pool(MonOpRequestRef op)
string erasure_code_profile;
stringstream ss;
string ruleset_name;
int rc;
if (m->auid)
return prepare_new_pool(m->name, m->auid, m->crush_rule, ruleset_name,
rc = prepare_new_pool(m->name, m->auid, m->crush_rule, ruleset_name,
0, 0,
erasure_code_profile,
pg_pool_t::TYPE_REPLICATED, 0, FAST_READ_OFF, &ss);
else
return prepare_new_pool(m->name, session->auid, m->crush_rule, ruleset_name,
rc = prepare_new_pool(m->name, session->auid, m->crush_rule, ruleset_name,
0, 0,
erasure_code_profile,
pg_pool_t::TYPE_REPLICATED, 0, FAST_READ_OFF, &ss);
if (rc != 0)
dout(5) << "prepare_new_pool failed with " << rc << ": " << ss.c_str() << dendl;

return rc;
}

int OSDMonitor::crush_rename_bucket(const string& srcname,
Expand Down

0 comments on commit 026db92

Please sign in to comment.