Whamcloud - gitweb
adjust krb5 related scripts, add krb5 support in replay-ost-single,
authorericm <ericm>
Fri, 13 May 2005 16:41:12 +0000 (16:41 +0000)
committerericm <ericm>
Fri, 13 May 2005 16:41:12 +0000 (16:41 +0000)
sanityN, sanity-ldlm.

lustre/tests/llmount.sh
lustre/tests/llrmount.sh
lustre/tests/recovery-small.sh
lustre/tests/replay-dual.sh
lustre/tests/replay-ost-single.sh
lustre/tests/replay-single.sh
lustre/tests/sanity-fid.sh
lustre/tests/sanity-gns.sh
lustre/tests/sanity-ldlm.sh
lustre/tests/sanity-lmv.sh
lustre/tests/sanityN.sh

index a8901ba..253932f 100755 (executable)
@@ -13,6 +13,8 @@ mkconfig=$(dirname $0)/$NAME.sh
 
 . krb5_env.sh
 start_krb5_kdc || exit 1
+start_lsvcgssd || exit 2
+start_lgssd || exit 3
 
 if [ "$PORTALS" ]; then
     portals_opt="--portals=$PORTALS"
@@ -25,23 +27,17 @@ fi
 if [ "$LDAPURL" ]; then
     conf_opt="--ldapurl $LDAPURL --config $NAME"
 else
-    sh $mkconfig $config || exit 2
+    sh $mkconfig $config || exit 4
     conf_opt="$config"
 fi    
 
 [ "$NODE" ] && node_opt="--node $NODE"
 [ "$DEBUG" ] && debug_opt="--ptldebug=$DEBUG"
 
-# We'd better start lsvcgssd after gss modules loaded.
-# remove this if we don't depend on lsvcgssd in the future
-${LCONF} --nosetup --sec $SECURITY $portals_opt $node_opt $@ $conf_opt || exit 3
-start_lsvcgssd || exit 4
-start_lgssd || exit 5
-
 ${LCONF} $NOMOD --sec $SECURITY $portals_opt $lustre_opt $node_opt \
-         ${REFORMAT:---reformat} $@ $conf_opt  || exit 6
+         ${REFORMAT:---reformat} $@ $conf_opt  || exit 5
 
 if [ "$MOUNT2" ]; then
-       $LLMOUNT -v -o sec=$SECURITY `hostname`:/mds1/client $MOUNT2 || exit 7
+       $LLMOUNT -v -o sec=$SECURITY `hostname`:/mds1/client $MOUNT2 || exit 6
 fi
 
index 3de7fcf..0cc2853 100755 (executable)
@@ -13,6 +13,8 @@ mkconfig=$NAME.sh
 . krb5_env.sh
 
 start_krb5_kdc || exit 1
+start_lsvcgssd || exit 2
+start_lgssd || exit 3
 
 if [ "$PORTALS" ]; then
   portals_opt="--portals=$PORTALS"
@@ -26,23 +28,17 @@ if [ "$LDAPURL" ]; then
     conf_opt="--ldapurl $LDAPURL --config $NAME"
 else
     if [ ! -f $config -o $mkconfig -nt $config ]; then
-       sh $mkconfig $config || exit 2
+       sh $mkconfig $config || exit 4
     fi
     conf_opt="$config"
 fi    
 
 [ "$NODE" ] && node_opt="--node $NODE"
 
-# We'd better start lsvcgssd after gss modules loaded.
-# remove this if we don't depend on lsvcgssd in the future
-${LCONF} --nosetup --sec $SECURITY $portals_opt $node_opt $@ $conf_opt || exit 3
-start_lsvcgssd || exit 4
-start_lgssd || exit 5
-
 ${LCONF} $NOMOD --sec $SECURITY $portals_opt $lustre_opt $node_opt \
-         $@ $conf_opt  || exit 6
+         $@ $conf_opt  || exit 5
 
 if [ "$MOUNT2" ]; then
-       $LLMOUNT -v -o sec=$SECURITY `hostname`:/mds1/client $MOUNT2 || exit 7
+       $LLMOUNT -v -o sec=$SECURITY `hostname`:/mds1/client $MOUNT2 || exit 6
 fi
 
index 2f84c01..ac1a811 100755 (executable)
@@ -51,10 +51,10 @@ gen_config() {
 setup() {
     gen_config
     start_krb5_kdc || exit 1
-    start ost --reformat $OSTLCONFARGS 
-    start ost2 --reformat $OSTLCONFARGS 
     start_lsvcgssd || exit 2
     start_lgssd || exit 3
+    start ost --reformat $OSTLCONFARGS 
+    start ost2 --reformat $OSTLCONFARGS 
     [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE
     for mds in `mds_list`; do
        start $mds --reformat $MDSLCONFARGS
@@ -67,10 +67,10 @@ cleanup() {
     for mds in `mds_list`; do
        stop $mds ${FORCE} $MDSLCONFARGS
     done
-    stop_lgssd
-    stop_lsvcgssd
     stop ost2 ${FORCE} --dump cleanup.log
     stop ost ${FORCE} --dump cleanup.log
+    stop_lgssd
+    stop_lsvcgssd
 }
 
 if [ ! -z "$EVAL" ]; then
index bd5a748..a09ef1b 100755 (executable)
@@ -63,10 +63,10 @@ cleanup() {
        sleep 5
        stop $mds ${FORCE} $MDSLCONFARGS
     done
-    stop_lgssd
-    stop_lsvcgssd
     stop ost2 ${FORCE}
     stop ost ${FORCE}  --dump cleanup-dual.log
+    stop_lgssd
+    stop_lsvcgssd
 }
 
 if [ "$ONLY" == "cleanup" ]; then
@@ -79,6 +79,8 @@ setup() {
     gen_config
 
     start_krb5_kdc || exit 1
+    start_lsvcgssd || exit 2
+    start_lgssd || exit 3
     start ost --reformat $OSTLCONFARGS 
     PINGER=`cat /proc/fs/lustre/pinger`
 
@@ -89,8 +91,6 @@ setup() {
     fi
 
     start ost2 --reformat $OSTLCONFARGS 
-    start_lsvcgssd || exit 2
-    start_lgssd || exit 3
     [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE
     for mds in `mds_list`; do
        start $mds --reformat $MDSLCONFARGS
index 398386d..095ef8b 100755 (executable)
@@ -53,6 +53,8 @@ cleanup() {
        stop $mds ${FORCE} $MDSLCONFARGS
     done
     stop ost ${FORCE} --dump cleanup.log
+    stop_lgssd
+    stop_lsvcgssd
 }
 
 if [ "$ONLY" == "cleanup" ]; then
@@ -69,6 +71,9 @@ CLEANUP=${CLEANUP:-"cleanup"}
 setup() {
     gen_config
 
+    start_krb5_kdc || exit 1
+    start_lsvcgssd || exit 2
+    start_lgssd || exit 3
     start ost --reformat $OSTLCONFARGS
     [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE
     for mds in `mds_list`; do
index b2c2616..41aabf3 100755 (executable)
@@ -66,10 +66,10 @@ cleanup() {
     for mds in `mds_list`; do
        stop $mds ${FORCE} $MDSLCONFARGS
     done
-    stop_lgssd
-    stop_lsvcgssd
     stop ost2 ${FORCE} --dump cleanup.log
     stop ost ${FORCE} --dump cleanup.log
+    stop_lgssd
+    stop_lsvcgssd
 }
 
 if [ "$ONLY" == "cleanup" ]; then
@@ -85,10 +85,10 @@ setup() {
     gen_config
 
     start_krb5_kdc || exit 1
-    start ost --reformat $OSTLCONFARGS 
-    start ost2 --reformat $OSTLCONFARGS 
     start_lsvcgssd || exit 2
     start_lgssd || exit 3
+    start ost --reformat $OSTLCONFARGS 
+    start ost2 --reformat $OSTLCONFARGS 
     [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE
     for mds in `mds_list`; do
        start $mds --reformat $MDSLCONFARGS
index 72942c7..2da851a 100644 (file)
@@ -37,21 +37,6 @@ MODE=${MODE:mds}
 
 . krb5_env.sh
 
-if [ $UID -ne 0 ]; then
-       RUNAS_ID="$UID"
-       RUNAS=""
-else
-       RUNAS_ID=${RUNAS_ID:-500}
-       RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
-fi
-
-if [ `using_krb5_sec $SECURITY` == 'y' ] ; then
-    start_krb5_kdc || exit 1
-    if [ $RUNAS_ID -ne $UID ]; then
-        $RUNAS ./krb5_refresh_cache.sh || exit 2
-    fi
-fi
-
 export NAME=${NAME:-local}
 
 SAVE_PWD=$PWD
index b55312a..0e07952 100644 (file)
@@ -38,21 +38,6 @@ PTLDEBUG=${PTLDEBUG:-0}
 
 . krb5_env.sh
 
-if [ $UID -ne 0 ]; then
-       RUNAS_ID="$UID"
-       RUNAS=""
-else
-       RUNAS_ID=${RUNAS_ID:-500}
-       RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
-fi
-
-if [ `using_krb5_sec $SECURITY` == 'y' ] ; then
-    start_krb5_kdc || exit 1
-    if [ $RUNAS_ID -ne $UID ]; then
-        $RUNAS ./krb5_refresh_cache.sh || exit 2
-    fi
-fi
-
 export NAME=${NAME:-local}
 
 SAVE_PWD=$PWD
index e5bd422..68dbb0f 100644 (file)
@@ -8,6 +8,7 @@ PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH
 MOUNT=${MOUNT:-/mnt/lustre}
 DIR=${DIR:-$MOUNT}
 export NAME=$NAME
+. krb5_env.sh
 clean() {
         echo -n "cln.."
         sh llmountcleanup.sh > /dev/null || exit 20
index e31e045..0a11ed7 100644 (file)
@@ -44,21 +44,6 @@ PTLDEBUG=${PTLDEBUG:-0}
 
 . krb5_env.sh
 
-if [ $UID -ne 0 ]; then
-       RUNAS_ID="$UID"
-       RUNAS=""
-else
-       RUNAS_ID=${RUNAS_ID:-500}
-       RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
-fi
-
-if [ `using_krb5_sec $SECURITY` == 'y' ] ; then
-    start_krb5_kdc || exit 1
-    if [ $RUNAS_ID -ne $UID ]; then
-        $RUNAS ./krb5_refresh_cache.sh || exit 2
-    fi
-fi
-
 export NAME=${NAME:-lmv}
 
 SAVE_PWD=$PWD
index 96532b7..576712b 100644 (file)
@@ -24,6 +24,8 @@ TOEXCL=${TOEXCL:-toexcl}
 TRUNCATE=${TRUNCATE:-truncate}
 export TMP=${TMP:-/tmp}
 
+. krb5_env.sh
+
 if [ $UID -ne 0 ]; then
        RUNAS_ID="$UID"
        RUNAS=""
@@ -32,6 +34,13 @@ else
        RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
 fi
 
+if [ `using_krb5_sec $SECURITY` == 'y' ] ; then
+    start_krb5_kdc || exit 1
+    if [ $RUNAS_ID -ne $UID ]; then
+        $RUNAS ./krb5_refresh_cache.sh || exit 2
+    fi
+fi
+
 SAVE_PWD=$PWD
 
 clean() {