From 8160af6284b24fe3ce38aa29be70fa39e05cdf8d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 27 Oct 2015 10:54:30 +0800 Subject: [PATCH] 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 --- src/tools/ceph-monstore-update-crush.sh | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/tools/ceph-monstore-update-crush.sh b/src/tools/ceph-monstore-update-crush.sh index dc6a6d724a50e..7fc41e062c8b1 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