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.
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>
Have a fix in place, would be sending out a pull request soon.
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?
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.
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.
- Status changed from New to Won't Fix
- Status changed from Won't Fix to Resolved
Also available in: Atom
PDF