Skip to content

Commit

Permalink
tools: ceph-monstore-update-crush: add "--test" option when testing c…
Browse files Browse the repository at this point in the history
…rushmap

Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Oct 27, 2015
1 parent 0b2170c commit b699258
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/tools/ceph-monstore-update-crush.sh
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b699258

Please sign in to comment.