Bug #8835
closedrados mkpool doesn't error out for pools which are existing
0%
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>
Updated by Pavan Rallabhandi almost 10 years ago
Have a fix in place, would be sending out a pull request soon.
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?
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.
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.
Updated by Pavan Rallabhandi over 9 years ago
This tracker has been fixed via the pull request https://github.com/ceph/ceph/pull/2209.
Updated by Pavan Rallabhandi over 9 years ago
I should have rather mentioned the commit https://github.com/ceph/ceph/commit/448edb191ca38c22c00923d63a5a83c884c2f223