]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush: "osd crush class rename" support 16961/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 10 Aug 2017 09:28:04 +0000 (17:28 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 11 Aug 2017 00:32:39 +0000 (08:32 +0800)
commitd792e8d528768eeccc6ad71af5aa3fd81780eb2e
tree9776d723accd34cf67132a9c453133433af91502
parentc8c837f665edc6e32efda5f15dedd8a48698214a
crush: "osd crush class rename" support

In 076a6abd80cc90ebcb901f908f880ef030721b2a I killed the 'class rename' command
and thought it was totally useless but I was wrong.

Consider the following user case:
(1) randomly choose some OSDs(e.g., from different hosts) and try to make them for private use only,
    say, by grouping them into 'pool1'
(2) ceph osd crush set-device-class pool1 'OSDs from (1)'
(3) ceph osd crush rule create-replicated rule_for_pool1 default host pool1
(4) ceph osd pool rename pool1 pool2
(5) ceph osd crush class rename pool1 pool2

From the above user case, we need to safely change a pool name without worrying
any risk of data migration. That is why the 'osd crush class rename' command
is still needed here.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
qa/standalone/crush/crush-classes.sh
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h
src/mon/MonCommands.h
src/mon/OSDMonitor.cc