]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: OSDMonitor: Make 'osd pool rename' idempotent
authorJoao Eduardo Luis <joao.luis@inktank.com>
Fri, 25 Oct 2013 02:33:53 +0000 (03:33 +0100)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Sat, 26 Oct 2013 00:28:10 +0000 (01:28 +0100)
commitc14c98d3f094d34907cc1fb97e7ef816f8dc0ba9
tree2a61d5dc8b5770bad8b533d24625ad02040d94c6
parent87d3f88742434a787c37f5a2a3e4fdb79e21d8a4
mon: OSDMonitor: Make 'osd pool rename' idempotent

'ceph osd pool rename' takes two arguments: source pool and dest pool.
If by chance 'source pool' does not exist and 'destination pool' does,
then, in order to assure it's idempotent, we want to assume that if
'source pool' no longer exists is because it was already renamed.

However, while we will return success in such case, we want to make sure
to let the user know that we made such assumption.  Mostly to warn the
user of such a thing in case of a mistake on the user's part (say, the
user didn't notice that the source pool didn't exist, while the dest did),
but also to make sure that the user is not surprised by the command
returning success if the user expected an ENOENT or EEXIST.

Fixes: #6635
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/mon/OSDMonitor.cc