Whamcloud - gitweb
conf-sanity: don't start/stop lsvcgssd/lgssd frequently.
[fs/lustre-release.git] / lustre / tests / conf-sanity.sh
index c6eff64..ffd5b30 100644 (file)
@@ -45,13 +45,11 @@ gen_second_config() {
 start_mds() {
        echo "start mds1 service on `facet_active_host mds1`"
        start mds1 --reformat $MDSLCONFARGS  || return 94
-       start_lsvcgssd || return 501
 }
 
 stop_mds() {
        echo "stop mds1 service on `facet_active_host mds1`"
        stop mds1 $@ || return 97
-       stop_lsvcgssd
 }
 
 start_ost() {
@@ -66,7 +64,6 @@ stop_ost() {
 
 mount_client() {
        local MOUNTPATH=$1
-       start_lgssd || return 502
        echo "mount lustre on ${MOUNTPATH}....."
        zconf_mount `hostname`  $MOUNTPATH  || return 96
 }
@@ -75,13 +72,11 @@ umount_client() {
        local MOUNTPATH=$1
        echo "umount lustre on ${MOUNTPATH}....."
        zconf_umount `hostname`  $MOUNTPATH || return 97
-       stop_lgssd
 }
 
 manual_umount_client(){
        echo "manual umount lustre on ${MOUNTPATH}...."
        do_facet  client "umount $MOUNT"
-       stop_lgssd
 }
 
 setup() {
@@ -122,7 +117,8 @@ build_test_filter
 
 gen_config
 start_krb5_kdc || exit 1
-
+start_lsvcgssd || return 2
+start_lgssd || return 3
 
 test_0() {
        start_ost
@@ -206,7 +202,6 @@ test_5() {
        kill -TERM $UMOUNT_PID
        echo "waiting for umount to finish"
        wait $UMOUNT_PID
-       stop_lgssd
 
        # cleanup client modules
        $LCONF --force --cleanup --nosetup --node client_facet $XMLCONFIG > /dev/null
@@ -232,12 +227,10 @@ test_5b() {
 
        [ -d $MOUNT ] || mkdir -p $MOUNT
        $LCONF --nosetup --node client_facet $XMLCONFIG > /dev/null
-       start_lgssd || return 1
        llmount -o nettype=$NETTYPE $mds_HOST://mds_svc/client_facet $MOUNT  && exit 2
 
        # cleanup client modules
        $LCONF --cleanup --nosetup --node client_facet $XMLCONFIG > /dev/null
-       stop_lgssd
        
        # stop_mds is a no-op here, and should not fail
        stop_mds || return 3
@@ -255,12 +248,10 @@ test_5c() {
 
        [ -d $MOUNT ] || mkdir -p $MOUNT
        $LCONF --nosetup --node client_facet $XMLCONFIG > /dev/null
-       start_lgssd || return 1
        llmount -o nettype=$NETTYPE $mds_HOST://wrong_mds_svc/client_facet $MOUNT  && return 2
 
        # cleanup client modules
        $LCONF --cleanup --nosetup --node client_facet $XMLCONFIG > /dev/null
-       stop_lgssd
        
        stop_mds || return 3
        stop_ost || return 4
@@ -278,13 +269,11 @@ test_5d() {
 
        [ -d $MOUNT ] || mkdir -p $MOUNT
        $LCONF --nosetup --node client_facet $XMLCONFIG > /dev/null
-       start_lgssd || return 1
-       llmount $mds_HOST://mds1_svc/client_facet $MOUNT  || return 1
+       llmount -o nettype=$NETTYPE $mds_HOST://mds1_svc/client_facet $MOUNT  || return 1
 
        umount $MOUNT || return 2
        # cleanup client modules
        $LCONF --cleanup --nosetup --node client_facet $XMLCONFIG > /dev/null
-       stop_lgssd
 
        stop_mds || return 3
 
@@ -364,18 +353,18 @@ test_9() {
         # check lconf --ptldebug/subsystem overriding lmc --ptldebug/subsystem
         start_ost
         start_mds
-        CHECK_PTLDEBUG="`do_facet mds1 cat /proc/sys/portals/debug`"
+        CHECK_PTLDEBUG="`do_facet mds1 sysctl portals.debug | cut -d= -f2`"
         if [ $CHECK_PTLDEBUG = "3" ]; then
            echo "lconf --debug success"
         else
            echo "lconf --debug: want 3, have $CHECK_PTLDEBUG"
            return 1
         fi
-        CHECK_SUBSYSTEM="`do_facet mds1 cat /proc/sys/portals/subsystem_debug`"
-        if [ $CHECK_SUBSYSTEM = "20" ]; then
+        CHECK_SUBSYS="`do_facet mds1 sysctl portals.subsystem_debug|cut -d= -f2`"
+        if [ $CHECK_SUBSYS = "20" ]; then
            echo "lconf --subsystem success"
         else
-           echo "lconf --subsystem: want 20, have $CHECK_SUBSYSTEM"
+           echo "lconf --subsystem: want 20, have $CHECK_SUBSYS"
            return 1
         fi
         mount_client $MOUNT
@@ -624,7 +613,7 @@ test_15() {
        [ ! `cp $LUSTRE/utils/llmount $MOUNTLUSTRE` ] || return $?
        do_node `hostname` mkdir -p $MOUNT 2> /dev/null
        # load llite module on the client if it isn't in /lib/modules
-       do_node `hostname` lconf --nosetup --node client_facet $XMLCONFIG
+       do_node `hostname` $LCONF --nosetup --node client_facet $XMLCONFIG
        do_node `hostname` mount -t lustre -o nettype=$NETTYPE \
                `facet_active_host mds1`:/mds1_svc/client_facet $MOUNT ||return $?
        echo "mount lustre on $MOUNT with $MOUNTLUSTRE: success"
@@ -782,4 +771,7 @@ test_18() {
 }
 run_test 18 "check lconf creates large journals"
 
+stop_lgssd
+stop_lsvcgssd
+
 equals_msg "Done"