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 <kchai@redhat.com>
-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
$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