X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fllmountcleanup.sh;h=ea054ee696ed66df10488f687f20db1f8ef9e073;hb=6f30c4a1bccd877410ab6a5d236b6427c279d452;hp=81a5832320b9b48d2774d2ec62fb0163ffc55619;hpb=04190b5f6540c8c6adb8f931ba133fc9683fe641;p=fs%2Flustre-release.git diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh index 81a5832..ea054ee 100755 --- a/lustre/tests/llmountcleanup.sh +++ b/lustre/tests/llmountcleanup.sh @@ -1,45 +1,60 @@ #!/bin/sh -LOOP0=/dev/loop0 -LOOP1=/dev/loop1 -if [ ! -e $LOOP0 ]; then - echo $LOOP0 'doesnt exist: (not) using devfs?' - exit +export PATH=`dirname $0`/../utils:$PATH + +LCONF=${LCONF:-lconf} +NAME=${NAME:-local} +TMP=${TMP:-/tmp} + +config=$NAME.xml +mkconfig=$NAME.sh + +. krb5_env.sh + +if [ "$PORTALS" ]; then + portals_opt="--portals=$PORTALS" +fi + +if [ "$LUSTRE" ]; then + lustre_opt="--lustre=$LUSTRE" +fi + +if [ "$LDAPURL" ]; then + conf_opt="--ldapurl $LDAPURL --config $NAME" +else + if [ ! -f $config ]; then + sh $mkconfig $config || exit 1 + fi + conf_opt="$config" +fi + +[ "$NODE" ] && node_opt="--node $NODE" + +sync; sleep 2; sync + +[ "$MOUNT2" ] && umount $MOUNT2 + +${LCONF} $NOMOD $portals_opt $lustre_opt $node_opt --cleanup $@ \ + --dump $TMP/debug $conf_opt +rc=$? +echo "lconf DONE" +stop_lsvcgssd +stop_lgssd + +BUSY=`dmesg | grep -i destruct` +if [ "$BUSY" ]; then + echo "$BUSY" 1>&2 + mv $TMP/debug $TMP/debug-busy.`date +%s` + exit 255 +fi +LEAK_LUSTRE=`dmesg | tail -n 30 | grep "obd mem.*leaked"` +LEAK_PORTALS=`dmesg | tail -n 20 | grep "Portals memory leaked"` +if [ "$LEAK_LUSTRE" -o "$LEAK_PORTALS" ]; then + echo "$LEAK_LUSTRE" 1>&2 + echo "$LEAK_PORTALS" 1>&2 + mv $TMP/debug $TMP/debug-leak.`date +%s` + exit 254 fi +lsmod | grep portals && echo "modules still loaded" && exit 1 -umount /mnt/obd - -rmmod llight -rmmod mdc -/usr/src/obd/utils/obdctl <