Skip to content

Commit

Permalink
Test scripts: delete everything except chunk inventory test directory…
Browse files Browse the repository at this point in the history
… and its content before hibernation and retire test to minimize test time. Shut down meta server before chunk servers. Do not fail recovery test if changing core file size limit does not succeed.
  • Loading branch information
mikeov committed Nov 18, 2017
1 parent dcba8cd commit 3830117
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
30 changes: 21 additions & 9 deletions src/test-scripts/qfstest.sh
Expand Up @@ -28,12 +28,13 @@ trdverify=${trdverify-0}
s3debug=0
jerasuretest=''
mycsdebugverifyiobuffers=0
myvalgrindlog='valgrind.log'

while [ $# -ge 1 ]; do
if [ x"$1" = x'-valgrind' ]; then
myvalgrind='valgrind'
myvalgrind="$myvalgrind"' -v'
myvalgrind="$myvalgrind"' --log-file=valgrind.log'
myvalgrind="$myvalgrind"' --log-file='"$myvalgrindlog"
myvalgrind="$myvalgrind"' --leak-check=full'
myvalgrind="$myvalgrind"' --leak-resolution=high'
myvalgrind="$myvalgrind"' --show-reachable=yes'
Expand Down Expand Up @@ -1165,11 +1166,16 @@ echo "Testing chunk server hibernate and retire"
# in the dumpster with replication larger than the number of chunk server
# would prevent chunk server "retirement", until expiration / cleanup.
# until they expire.
for d in /user /sort; do
if runqfsroot -test -e "$d"; then
runqfsroot -rmr -skipTrash "$d" || exit
fi
done

rootrmlist=`runqfsroot -ls '/' \
| awk '/^[d-]/{ if ($NF != "/dumpster" &&
$NF != "'"$chunkinventorytestdir"'") print $NF; }'`
if [ x"$rootrmlist" = x ]; then
true
else
runqfsroot -rmr -skipTrash $rootrmlist || exit
fi

movefromdumpster='/movefromdumpster.tmp'
runqfsroot -mkdir "$movefromdumpster" || exit
runqfsroot -ls '/dumpster' \
Expand All @@ -1188,7 +1194,6 @@ done || exit
metaserversetparameter 'metaServer.panicOnRemoveFromPlacement=0'

upserverslist='upservers.tmp'
QFS_CLIENT_CONFIG= \
runqfsadmin upservers > "$upserverslist" || exit

# Tell chunk servers to re-connect to the meta server, in order to exercise
Expand Down Expand Up @@ -1241,6 +1246,9 @@ while [ $i -lt $e ]; do
true
else
echo "Restarting chunk server $i"
if [ -e "$myvalgrindlog" ]; then
mv "$myvalgrindlog" "$myvalgrindlog"'.run.log' || exit
fi
myrunprog "$chunkbindir"/chunkserver \
"$chunksrvprop" "$chunksrvlog" >> "${chunksrvout}" 2>&1 &
echo $! > "$chunksrvpid"
Expand All @@ -1250,10 +1258,14 @@ done
cd "$testdir" || exit
waitrecoveryperiodend

# For now pause to let chunk server IOs complete
# Allow meta server to run re-balancer
sleep 5
echo "Shutting down"
pids=`getpids`
kill -QUIT "$metapid" || exit

pids=`getpids | grep -v "$metapid"`
# For now pause to let chunk server IOs complete
sleep 2
for pid in $pids; do
kill -QUIT "$pid" || exit
done
Expand Down
2 changes: 1 addition & 1 deletion src/test-scripts/recoverytest.sh
Expand Up @@ -25,7 +25,7 @@
# recovery by deleting chunk files and running file verification, and
# using admin tool to force recovery of existing chunks.

ulimit -c unlimited || exit
ulimit -c unlimited

builddir=`pwd`
toolsdir=${toolsdir-"$builddir"/src/cc/tools}
Expand Down

0 comments on commit 3830117

Please sign in to comment.