From: Kefu Chai Date: Tue, 27 Oct 2015 02:54:30 +0000 (+0800) Subject: tools: ceph-monstore-update-crush: add "--test" to crushtool X-Git-Tag: v10.0.0~38^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8160af6284b24fe3ce38aa29be70fa39e05cdf8d;p=ceph.git tools: ceph-monstore-update-crush: add "--test" to crushtool in addition to testing the references to unknown name/type, we should perform necessary test the crushmap when looking for a good crushmap Signed-off-by: Kefu Chai --- diff --git a/src/tools/ceph-monstore-update-crush.sh b/src/tools/ceph-monstore-update-crush.sh index dc6a6d724a50..7fc41e062c8b 100755 --- a/src/tools/ceph-monstore-update-crush.sh +++ b/src/tools/ceph-monstore-update-crush.sh @@ -54,7 +54,7 @@ function test_crush() { -v $epoch -o $osdmap > /dev/null osdmaptool --export-crush $crush $osdmap &> /dev/null - if crushtool --check $max_osd -i $crush > /dev/null; then + if crushtool --test --check $max_osd -i $crush > /dev/null; then good=true else good=false @@ -63,17 +63,6 @@ function test_crush() { $good || return 1 } -function get_crush() { - local store_path=$1 - local osdmap_epoch=$2 - local osdmap_path=`mktemp` - local crush_path=`mktemp` - - ceph-monstore-tool $store_path get osdmap -- \ - -v $osdmap_epoch -o $osdmap_path - osdmaptool --export-crush $crush $osdmap_path 2>&1 > /dev/null -} - function die() { local retval=$? echo "$@" >&2