From 946877334fb4e4bf8874700973a71c4aaece4a1a Mon Sep 17 00:00:00 2001 From: grev Date: Mon, 9 Nov 2009 12:09:10 +0000 Subject: [PATCH] revert 21115 patch, it causes b=21308 --- lustre/tests/acceptance-small.sh | 12 +++++++-- lustre/tests/test-framework.sh | 53 ++++++---------------------------------- 2 files changed, 17 insertions(+), 48 deletions(-) diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index 3b1e3d7..51e5b61 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -54,7 +54,7 @@ setup_if_needed() { local MOUNTED=$(mounted_lustre_filesystems) if $(echo $MOUNTED | grep -w -q $MOUNT); then - check_config_clients $MOUNT + check_config $MOUNT init_facets_vars init_param_vars return @@ -280,7 +280,15 @@ for NAME in $CONFIGS; do if [ "$SANITYN" != "no" ]; then title sanityN - bash sanityN.sh + $DEBUG_OFF + + mkdir -p $MOUNT2 + mount_client $MOUNT2 + #echo "can't mount2 for '$NAME', skipping sanityN.sh" + START=: CLEAN=: bash sanityN.sh + [ "$(mount | grep $MOUNT2)" ] && umount $MOUNT2 + + $DEBUG_ON $CLEANUP $SETUP SANITYN="done" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index b4a8da4..682cf82 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1533,7 +1533,9 @@ nfs_client_mode () { return 1 } -check_config_client () { +check_config () { + nfs_client_mode && return + local mntpt=$1 local mounted=$(mount | grep " $mntpt ") @@ -1573,16 +1575,6 @@ check_config_client () { # Please use correct config or set mds_HOST correctly!" # fi -} - -check_config_clients () { - local clients=${CLIENTS:-$HOSTNAME} - local mntpt=$1 - - nfs_client_mode && return - - do_rpc_nodes $clients check_config_client $mntpt - sanity_mount_check || error "environments are insane!" } @@ -1616,30 +1608,17 @@ check_and_setup_lustre() { # MOUNT2 is mounted, MOUNT_2 is not set if ! [ "$MOUNT_2" ]; then - cleanup_mount $MOUNT2 + zconf_umount `hostname` $MOUNT2 export I_UMOUNTED2=yes # MOUNT2 is mounted, MOUNT_2 is set else - # FIXME: what to do if check_config failed? - # i.e. if: - # 1) remote client has mounted other Lustre fs ? - # 2) it has insane env ? - # let's try umount MOUNT2 on all clients and mount it again: - if ! check_config_clients $MOUNT2; then - cleanup_mount $MOUNT2 - restore_mount $MOUNT2 - export I_MOUNTED2=yes - fi + check_config $MOUNT2 fi fi if $do_check; then - # FIXME: what to do if check_config failed? - # i.e. if: - # 1) remote client has mounted other Lustre fs? - # 2) lustre is mounted on remote_clients atall ? - check_config_clients $MOUNT + check_config $MOUNT init_facets_vars init_param_vars @@ -1653,20 +1632,6 @@ check_and_setup_lustre() { fi } -restore_mount () { - local clients=${CLIENTS:-$HOSTNAME} - local mntpt=$1 - - zconf_mount_clients $clients $mntpt -} - -cleanup_mount () { - local clients=${CLIENTS:-$HOSTNAME} - local mntpt=$1 - - zconf_umount_clients $clients $mntpt -} - cleanup_and_setup_lustre() { if [ "$ONLY" == "cleanup" -o "`mount | grep $MOUNT`" ]; then lctl set_param debug=0 || true @@ -1684,13 +1649,9 @@ check_and_cleanup_lustre() { [ "$ENABLE_QUOTA" ] && restore_quota_type || true fi if [ "$I_UMOUNTED2" = "yes" ]; then - restore_mount $MOUNT2 || error "restore $MOUNT2 failed" + mount_client $MOUNT2 || error "restore $MOUNT2 failed" fi - if [ "$I_MOUNTED2" = "yes" ]; then - cleanup_mount $MOUNT2 - fi - zconf_umount_clients $clients $MOUNT2 if [ "$I_MOUNTED" = "yes" ]; then cleanupall -f || error "cleanup failed" fi -- 1.8.3.1