Project

General

Profile

Actions

Bug #8835

closed

rados mkpool doesn't error out for pools which are existing

Added by Pavan Rallabhandi almost 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
librados
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

'rados mkpool' doesn't seem to throw an error, for pools that are already existing.

<snip>

root#: rados mkpool foo
successfully created pool foo
root#: rados lspools
data
metadata
rbd
foo
root#: rados mkpool foo
successfully created pool foo

<\snip>

Actions #1

Updated by Pavan Rallabhandi almost 10 years ago

Have a fix in place, would be sending out a pull request soon.

Actions #2

Updated by Greg Farnum almost 10 years ago

This is basically intended behavior; under some circumstances the message to the monitors can get "replayed" and there's no way for the monitors to distinguish between that and an accidental create call.
What we could do is look at the osdmap on the client side and refuse to even try the create, maybe?

Actions #3

Updated by Pavan Rallabhandi almost 10 years ago

Greg, the check is actually present in Objecter::create_pool() which is not hit(may be due to a stale osdmap?). I have now moved the check to be in librados::RadosClient::pool_create() with a pre condition of 'wait_for_osdmap()', and that seem to solve the issue. This also makes it consistent with other pool operations like 'pool listing/pool delete etc..

Please let me know if that sounds right.

Actions #4

Updated by Greg Farnum almost 10 years ago

Hmm. That's probably fine, assuming it's wired up correctly (e.g., doesn't get blocked if the osdmap is up to date). Speed of pool creates isn't really an issue we worry about, so delaying it a little is fine.

Actions #5

Updated by Sage Weil over 9 years ago

  • Status changed from New to Won't Fix
Actions #6

Updated by Pavan Rallabhandi over 9 years ago

This tracker has been fixed via the pull request https://github.com/ceph/ceph/pull/2209.

Actions #8

Updated by Sage Weil over 9 years ago

  • Status changed from Won't Fix to Resolved
Actions

Also available in: Atom PDF