]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: add the osd crush rename-bucket command
authorLoic Dachary <loic-201408@dachary.org>
Thu, 16 Oct 2014 00:14:53 +0000 (17:14 -0700)
committerLoic Dachary <loic-201408@dachary.org>
Thu, 16 Oct 2014 00:22:12 +0000 (17:22 -0700)
commitaa675604c9cb8f1fca7fb67005ab52da30a18428
tree99097b72c62a41de9ae54089eb17875512da1260
parent29d13d41c5682c6a7bcf1e46d8ad059ff0152eba
mon: add the osd crush rename-bucket command

The synopsis is:

 osd crush rename-bucket name1 name2

It is made idempotent by interpreting -EALREADY as returned by
CrushWrapper::rename_bucket return as success.

The crush_rename_bucket method first checks for errors with
CrushWrapper::can_rename_bucket if there is no pending crush so that it
can return early and avoid the creation of a pending crush map.

If renaming is possible, CrushWrapper::rename_bucket is called on the
pending crush map (and creates it indirectly if it does not already
exists).

http://tracker.ceph.com/issues/9526 Fixes: #9526

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
src/mon/MonCommands.h
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h