Skip to content

Commit

Permalink
vstart tests: specify ceph.conf
Browse files Browse the repository at this point in the history
Signed-off-by: Colin McCabe <[email protected]>
  • Loading branch information
cmccabe committed Apr 18, 2011
1 parent 878f4a4 commit ab9dc12
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions src/test/test_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ write_objects() {
chr=`perl -e "print chr(48+$v)"`
head -c $obj_size /dev/zero | tr '\0' "$chr" > $TEMPDIR/ver$v
for i in `seq -w 1 $num_objs`; do
./rados -p $pool rm obj$i || die "radostool failed"
./rados -p $pool put obj$i $TEMPDIR/ver$v || die "radostool failed"
./rados -c ./ceph.conf -p $pool rm obj$i || die "radostool failed"
./rados -c ./ceph.conf -p $pool put obj$i $TEMPDIR/ver$v || die "radostool failed"
done
done
}
Expand All @@ -109,7 +109,7 @@ read_objects() {
chr=`perl -e "print chr(48+$ver)"`
head -c $obj_size /dev/zero | tr '\0' "$chr" > $TEMPDIR/exemplar
for i in `seq -w 1 $num_objs`; do
./rados -p $pool get obj$i $TEMPDIR/out$i || die "radostool failed"
./rados -c ./ceph.conf -p $pool get obj$i $TEMPDIR/out$i || die "radostool failed"
cmp $TEMPDIR/out$i $TEMPDIR/exemplar || die "got back incorrect obj$i"
done
}
Expand Down Expand Up @@ -145,7 +145,7 @@ start_recovery() {
CEPH_NUM_OSD=$1
osd=0
while [ $osd -lt $CEPH_NUM_OSD ]; do
./ceph osd tell $osd debug kick_recovery_wq 0
./ceph -c ./ceph.conf osd tell $osd debug kick_recovery_wq 0
osd=$((osd+1))
done
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_csyn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ osd max scrubs = 0' || die "vstart failed"
}

csyn_simple1_impl() {
./csyn --syn writefile 100 1000 --syn writefile 100 1000 || die "csyn failed"
./csyn -c ./ceph.conf --syn writefile 100 1000 --syn writefile 100 1000 || die "csyn failed"
}

csyn_simple1() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/test_lost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ lost1_impl() {
# verify we get woken to an error when it's declared lost.
echo "trying to get one of the unfound objects"
(
./rados -p data get obj02 $TEMPDIR/obj02 &&\
./rados -c ./ceph.conf -p data get obj02 $TEMPDIR/obj02 &&\
die "expected radostool error"
) &
fi
Expand All @@ -108,7 +108,7 @@ lost1_impl() {

# Reading from a lost object gives back an error code.
# TODO: check error code
./rados -p data get obj01 $TEMPDIR/obj01 &&\
./rados -c ./ceph.conf -p data get obj01 $TEMPDIR/obj01 &&\
die "expected radostool error"

if [ "$try_to_fetch_unfound" -eq 1 ]; then
Expand Down
4 changes: 2 additions & 2 deletions src/test/test_missing_unfound.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

CEPH_NUM_OSD=3 ./vstart.sh -d -n -x -o 'osd recovery max active = 1'

./ceph osd pool set data size 3
./ceph -c ./ceph.conf osd pool set data size 3

sleep 20

Expand All @@ -11,7 +11,7 @@ sleep 20

for f in `seq 1 100`
do
./rados -p data put test_$f /etc/passwd
./rados -c ./ceph.conf -p data put test_$f /etc/passwd
done

# zap some objects on both replicas
Expand Down
4 changes: 2 additions & 2 deletions src/test/test_pools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ setup() {

test629_impl() {
# create the pool
./rados mkpool foo || die "mkpool failed"
./rados -c ./ceph.conf mkpool foo || die "mkpool failed"

# Write lots and lots of objects
write_objects 1 1 10 1000000 foo
Expand All @@ -31,7 +31,7 @@ test629_impl() {
poll_cmd "./ceph pg debug degraded_pgs_exist" TRUE 3 120

# delete the pool
./rados rmpool foo || die "rmpool failed"
./rados -c ./ceph.conf rmpool foo || die "rmpool failed"

# make sure the system is stable
sleep 10
Expand Down
6 changes: 3 additions & 3 deletions src/test/test_split.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ setup() {
}

get_pgp_num() {
./ceph osd pool get data pgp_num > $TEMPDIR/pgp_num
./ceph -c ./ceph.conf osd pool get data pgp_num > $TEMPDIR/pgp_num
[ $? -eq 0 ] || die "failed to get pgp_num"
PGP_NUM=`grep PGP_NUM $TEMPDIR/pgp_num | sed 's/.*PGP_NUM:\([ 0123456789]*\).*$/\1/'`
}
Expand All @@ -37,7 +37,7 @@ split1_impl() {
# Double the number of PGs
PGP_NUM=$((PGP_NUM*2))
echo "doubling PGP_NUM to $PGP_NUM..."
./ceph osd pool set data pgp_num $PGP_NUM
./ceph -c ./ceph.conf osd pool set data pgp_num $PGP_NUM

sleep 30

Expand All @@ -53,7 +53,7 @@ split1() {
many_pools() {
setup 3
for i in `seq 1 3000`; do
./rados mkpool "pool${i}" || die "mkpool failed"
./rados -c ./ceph.conf mkpool "pool${i}" || die "mkpool failed"
done
my_write_objects 1 10
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_unfound.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ osd_resurrection_1_impl() {
echo "Got unfound objects."

(
./rados -p data get obj01 $TEMPDIR/obj01 || die "radostool failed"
./rados -c ./ceph.conf -p data get obj01 $TEMPDIR/obj01 || die "radostool failed"
) &
sleep 5
[ -e $TEMPDIR/obj01 ] && die "unexpected error: fetched unfound object?"
Expand Down

0 comments on commit ab9dc12

Please sign in to comment.