]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush: "osd crush class rename" support
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 10 Aug 2017 09:28:04 +0000 (17:28 +0800)
committerSage Weil <sage@redhat.com>
Fri, 11 Aug 2017 13:45:54 +0000 (09:45 -0400)
commit263797555f294b90dce51d38586898a945b9356c
tree05a4dfef5273a269f36326b5590e0ba8d608d9f1
parent2579054279c12632a6bd0b281e6a499b2ee40495
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>
(cherry picked from commit d792e8d528768eeccc6ad71af5aa3fd81780eb2e)
qa/standalone/crush/crush-classes.sh
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h
src/mon/MonCommands.h
src/mon/OSDMonitor.cc