Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/vstart_wrapper.sh: display_log on test failure #15620

Merged
merged 3 commits into from Jun 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions qa/workunits/ceph-helpers.sh
Expand Up @@ -1638,18 +1638,24 @@ function test_wait_background() {

function flush_pg_stats()
{
local timeout=${1:-$TIMEOUT}

ids=`ceph osd ls`
seqs=''
for osd in $ids; do
seq=`ceph tell osd.$osd flush_pg_stats`
seqs="$seqs $osd-$seq"
done

for s in $seqs; do
osd=`echo $s | cut -d - -f 1`
seq=`echo $s | cut -d - -f 2`
echo "waiting osd.$osd seq $seq"
while test $(ceph osd last-stat-seq $osd) -lt $seq; do
sleep 1
if [ $((timeout--)) -eq 0 ]; then
return 1
fi
done
done
}
Expand Down
18 changes: 0 additions & 18 deletions qa/workunits/cephtool/test.sh
Expand Up @@ -294,24 +294,6 @@ function test_tiering_agent()
ceph osd pool delete $slow $slow --yes-i-really-really-mean-it
}

function flush_pg_stats()
{
ids=`ceph osd ls`
seqs=''
for osd in $ids
do
seq=`ceph tell osd.$osd flush_pg_stats`
seqs="$seqs $osd-$seq"
done
for s in $seqs
do
osd=`echo $s | cut -d - -f 1`
seq=`echo $s | cut -d - -f 2`
echo "waiting osd.$osd seq $seq"
while test $(ceph osd last-stat-seq $osd) -lt $seq; do sleep 1 ; done
done
}

function test_tiering_1()
{
# tiering
Expand Down
8 changes: 7 additions & 1 deletion src/test/vstart_wrapper.sh
Expand Up @@ -62,7 +62,13 @@ function main()
{
teardown $CEPH_DIR
vstart_setup || return 1
CEPH_CONF=$CEPH_DIR/ceph.conf "$@" || return 1
if CEPH_CONF=$CEPH_DIR/ceph.conf "$@"; then
code=0
else
code=1
display_logs $CEPH_OUT_DIR
fi
return $code
}

main "$@"