Whamcloud - gitweb
LU-8066 tests: use lod / osp tunables on servers 49/35349/4
authorJames Simmons <uja.ornl@yahoo.com>
Tue, 11 Jun 2019 15:39:17 +0000 (11:39 -0400)
committerOleg Drokin <green@whamcloud.com>
Sun, 11 Aug 2019 23:33:27 +0000 (23:33 +0000)
Before the lustre 2.4 OSD work the lov and osc code was used on
both servers and clients. With the OSD layer work we saw the new
lod and osp layers created that are server specific. To avoid
breakage symlinks were created that went from the lod / osp to
lov / osc directories in the proc tree on the server side.

It has been a very long time since that change so we can now
safely start to unwind that handling. The first step taken here
is to migrate the maloo test from using lov / osc for the server
tunables to using lod / osp instead.

Lustre-commit: c2f43d4c7a609def4292c5b9bee63c9a33cb4598
Reviewed-on: https://review.whamcloud.com/35185

Change-Id: I9dd562cd74d68aaa0226d5ab93042b52193604a1
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/35185
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/35349
Tested-by: jenkins <devops@whamcloud.com>
lustre/tests/conf-sanity.sh
lustre/tests/replay-single.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh

index 69af643..7c2e002 100644 (file)
@@ -1138,8 +1138,8 @@ test_29() {
        # on the MDS servers which is tested with wait_osp_* below.
        # For ost_server_uuid that only exist on client so filtering
        # is safe.
-       local PROC_ACT="osc.$FSNAME-OST0001-osc-[^M]*.active"
-       local PROC_UUID="osc.$FSNAME-OST0001-osc-[^M]*.ost_server_uuid"
+       local PROC_ACT="os[cp].$FSNAME-OST0001-osc-[^M]*.active"
+       local PROC_UUID="os[cp].$FSNAME-OST0001-osc-[^M]*.ost_server_uuid"
 
        ACTV=$($LCTL get_param -n $PROC_ACT)
        DEAC=$((1 - $ACTV))
@@ -4904,7 +4904,7 @@ test_69() {
        local OSTNAME=$(ostname_from_index 0)
        local mdtosc_proc1=$(get_mdtosc_proc_path mds1 $OSTNAME)
        local last_id=$(do_facet mds1 $LCTL get_param -n \
-                       osc.$mdtosc_proc1.prealloc_last_id)
+                       osp.$mdtosc_proc1.prealloc_last_id)
 
        # Want to have OST LAST_ID over 5 * OST_MAX_PRECREATE to
        # verify that the LAST_ID recovery is working properly. If
@@ -5892,7 +5892,7 @@ test_82a() { # LU-4665
 
        # Collect debug information - start of test
        do_nodes $(comma_list $(mdts_nodes)) \
-                  $LCTL get_param osc.*.prealloc_*_id
+                  $LCTL get_param osp.*.prealloc_*_id
 
        mount_client $MOUNT || error "mount client $MOUNT failed"
        wait_osts_up
@@ -5901,7 +5901,7 @@ test_82a() { # LU-4665
        mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
 
        stack_trap "do_nodes $(comma_list $(mdts_nodes)) \
-                  $LCTL get_param osc.*.prealloc_*_id" EXIT
+                  $LCTL get_param osp.*.prealloc_*_id" EXIT
 
        # 1. If the file does not exist, new file will be created
        #    with specified OSTs.
index 6204c72..0355da1 100755 (executable)
@@ -1964,13 +1964,13 @@ test_67b() #bug 3055
     at_start || return 0
     CONN1=$(lctl get_param -n osc.*.stats | awk '/_connect/ {total+=$2} END {print total}')
 
-    # exhaust precreations on ost1
-    local OST=$(ostname_from_index 0)
-    local mdtosc=$(get_mdtosc_proc_path mds $OST)
-    local last_id=$(do_facet $SINGLEMDS lctl get_param -n \
-        osc.$mdtosc.prealloc_last_id)
-    local next_id=$(do_facet $SINGLEMDS lctl get_param -n \
-        osc.$mdtosc.prealloc_next_id)
+       # exhaust precreations on ost1
+       local OST=$(ostname_from_index 0)
+       local mdtosc=$(get_mdtosc_proc_path mds $OST)
+       local last_id=$(do_facet $SINGLEMDS lctl get_param -n \
+                       osp.$mdtosc.prealloc_last_id)
+       local next_id=$(do_facet $SINGLEMDS lctl get_param -n \
+                       osp.$mdtosc.prealloc_next_id)
 
        mkdir -p $DIR/$tdir/${OST} || error "mkdir $DIR/$tdir/${OST} failed"
        $SETSTRIPE -i 0 -c 1 $DIR/$tdir/${OST} || error "$SETSTRIPE failed"
@@ -3224,11 +3224,11 @@ test_88() { #bug 17485
        replay_barrier ost1
        replay_barrier $SINGLEMDS
 
-    # exhaust precreations on ost1
-    local OST=$(ostname_from_index 0)
-    local mdtosc=$(get_mdtosc_proc_path $SINGLEMDS $OST)
-    local last_id=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_last_id)
-    local next_id=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_next_id)
+       # exhaust precreations on ost1
+       local OST=$(ostname_from_index 0)
+       local mdtosc=$(get_mdtosc_proc_path $SINGLEMDS $OST)
+       local last_id=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_last_id)
+       local next_id=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_next_id)
        echo "before test: last_id = $last_id, next_id = $next_id"
 
        echo "Creating to objid $last_id on ost $OST..."
@@ -3240,8 +3240,8 @@ test_88() { #bug 17485
        createmany -o $DIR/$tdir/f-%d $last_id 8 ||
                error "createmany create files with uncommitted objids failed"
 
-    last_id2=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_last_id)
-    next_id2=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_next_id)
+    last_id2=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_last_id)
+    next_id2=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_next_id)
     echo "before recovery: last_id = $last_id2, next_id = $next_id2" 
 
     # if test uses shutdown_facet && reboot_facet instead of facet_failover ()
@@ -3264,8 +3264,8 @@ test_88() { #bug 17485
 
     clients_up
 
-    last_id2=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_last_id)
-    next_id2=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_next_id)
+    last_id2=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_last_id)
+    next_id2=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_next_id)
        echo "after recovery: last_id = $last_id2, next_id = $next_id2"
 
        # create new files, which should use new objids, and ensure the orphan
index ce671aa..b58c998 100755 (executable)
@@ -1648,7 +1648,7 @@ test_27m() {
 run_test 27m "create file while OST0 was full"
 
 sleep_maxage() {
-       local delay=$(do_facet $SINGLEMDS lctl get_param -n lov.*.qos_maxage |
+       local delay=$(do_facet $SINGLEMDS lctl get_param -n lo[vd].*.qos_maxage |
                      awk '{ print $1 * 2; exit; }')
        sleep $delay
 }
@@ -1682,12 +1682,12 @@ exhaust_precreations() {
        # on the mdt's osc
        local mdtosc_proc1=$(get_mdtosc_proc_path $mfacet $OST)
        local last_id=$(do_facet $mfacet lctl get_param -n \
-                       osc.$mdtosc_proc1.prealloc_last_id)
+                       osp.$mdtosc_proc1.prealloc_last_id)
        local next_id=$(do_facet $mfacet lctl get_param -n \
-                       osc.$mdtosc_proc1.prealloc_next_id)
+                       osp.$mdtosc_proc1.prealloc_next_id)
 
        local mdtosc_proc2=$(get_mdtosc_proc_path $mfacet)
-       do_facet $mfacet lctl get_param osc.$mdtosc_proc2.prealloc*
+       do_facet $mfacet lctl get_param osp.$mdtosc_proc2.prealloc*
 
        test_mkdir -p $DIR/$tdir/${OST}
        $SETSTRIPE -i $OSTIDX -c 1 $DIR/$tdir/${OST}
@@ -1695,7 +1695,7 @@ exhaust_precreations() {
        do_facet $ofacet lctl set_param fail_val=$FAILIDX fail_loc=0x215
        echo "Creating to objid $last_id on ost $OST..."
        createmany -o $DIR/$tdir/${OST}/f $next_id $((last_id - next_id + 2))
-       do_facet $mfacet lctl get_param osc.$mdtosc_proc2.prealloc*
+       do_facet $mfacet lctl get_param osp.$mdtosc_proc2.prealloc*
        do_facet $ofacet lctl set_param fail_loc=$FAILLOC
        sleep_maxage
 }
@@ -1938,9 +1938,9 @@ test_27y() {
 
        local mdtosc=$(get_mdtosc_proc_path $SINGLEMDS $FSNAME-OST0000)
        local last_id=$(do_facet $SINGLEMDS lctl get_param -n \
-               osc.$mdtosc.prealloc_last_id)
+               osp.$mdtosc.prealloc_last_id)
        local next_id=$(do_facet $SINGLEMDS lctl get_param -n \
-               osc.$mdtosc.prealloc_next_id)
+               osp.$mdtosc.prealloc_next_id)
        local fcount=$((last_id - next_id))
        [[ $fcount -eq 0 ]] && skip "not enough space on OST0"
        [[ $fcount -gt $OSTCOUNT ]] && fcount=$OSTCOUNT
@@ -4665,7 +4665,7 @@ test_53() {
        local mdtosc=$(get_mdtosc_proc_path $SINGLEMDS)
        local value
        for value in $(do_facet $SINGLEMDS \
-                      $LCTL get_param osc.$mdtosc.prealloc_last_id) ; do
+                      $LCTL get_param osp.$mdtosc.prealloc_last_id) ; do
                param=$(echo ${value[0]} | cut -d "=" -f1)
                ostname=$(echo $param | cut -d "." -f2 | cut -d - -f 1-2)
 
@@ -8993,7 +8993,7 @@ test_116a() { # was previously test_116()
        remote_mds_nodsh && skip "remote MDS with nodsh"
 
        echo -n "Free space priority "
-       do_facet $SINGLEMDS lctl get_param -n lo*.*-mdtlov.qos_prio_free |
+       do_facet $SINGLEMDS lctl get_param -n lo[vd].*-mdtlov.qos_prio_free |
                head -n1
        declare -a AVAIL
        free_min_max
@@ -9114,17 +9114,17 @@ test_116b() { # LU-2093
 
 #define OBD_FAIL_MDS_OSC_CREATE_FAIL     0x147
        local old_rr=$(do_facet $SINGLEMDS lctl get_param -n \
-                      lo*.$FSNAME-MDT0000-mdtlov.qos_threshold_rr | head -1)
+                      lo[vd].$FSNAME-MDT0000-mdtlov.qos_threshold_rr | head -1)
        [ -z "$old_rr" ] && skip "no QOS"
        do_facet $SINGLEMDS lctl set_param \
-               lo*.$FSNAME-MDT0000-mdtlov.qos_threshold_rr=0
+               lo[vd].$FSNAME-MDT0000-mdtlov.qos_threshold_rr=0
        mkdir -p $DIR/$tdir
        do_facet $SINGLEMDS lctl set_param fail_loc=0x147
        createmany -o $DIR/$tdir/f- 20 || error "can't create"
        do_facet $SINGLEMDS lctl set_param fail_loc=0
        rm -rf $DIR/$tdir
        do_facet $SINGLEMDS lctl set_param \
-               lo*.$FSNAME-MDT0000-mdtlov.qos_threshold_rr=$old_rr
+               lo[vd].$FSNAME-MDT0000-mdtlov.qos_threshold_rr=$old_rr
 }
 run_test 116b "QoS shouldn't LBUG if not enough OSTs found on the 2nd pass"
 
@@ -14586,9 +14586,9 @@ test_220() { #LU-325
        # on the mdt's osc
        local mdtosc_proc1=$(get_mdtosc_proc_path $SINGLEMDS $OST)
        local last_id=$(do_facet $SINGLEMDS lctl get_param -n \
-                       osc.$mdtosc_proc1.prealloc_last_id)
+                       osp.$mdtosc_proc1.prealloc_last_id)
        local next_id=$(do_facet $SINGLEMDS lctl get_param -n \
-                       osc.$mdtosc_proc1.prealloc_next_id)
+                       osp.$mdtosc_proc1.prealloc_next_id)
 
        $LFS df -i
 
@@ -14614,9 +14614,9 @@ test_220() { #LU-325
        createmany -o $DIR/$tdir/f $MDSOBJS || return 3
 
        local last_id2=$(do_facet mds${MDSIDX} lctl get_param -n \
-                       osc.$mdtosc_proc1.prealloc_last_id)
+                       osp.$mdtosc_proc1.prealloc_last_id)
        local next_id2=$(do_facet mds${MDSIDX} lctl get_param -n \
-                       osc.$mdtosc_proc1.prealloc_next_id)
+                       osp.$mdtosc_proc1.prealloc_next_id)
 
        echo "after creation, last_id=$last_id2, next_id=$next_id2"
        $LFS df -i
index 7ee0ee7..97bd868 100755 (executable)
@@ -7015,7 +7015,7 @@ _wait_osc_import_state() {
        local ost_facet=$2
        local expected=$3
        local target=$(get_osc_import_name $facet $ost_facet)
-       local param="osc.${target}.ost_server_uuid"
+       local param="os[cp].${target}.ost_server_uuid"
        local params=$param
        local i=0
 
@@ -7707,12 +7707,12 @@ flvr_cnt_mdt2ost()
         mdtosc=$(get_mdtosc_proc_path mds$num)
         mdtosc=${mdtosc/-MDT*/-MDT\*}
        local output=$(do_facet mds$num lctl get_param -n \
-                osc.$mdtosc.$PROC_CLI 2>/dev/null)
+                      os[cp].$mdtosc.$PROC_CLI 2>/dev/null)
        local tmpcnt=$(count_flvr "$output" $flavor)
        if $GSS_SK && [ $flavor != "null" ]; then
                # tmpcnt=min(contexts,flavors) to ensure SK context is on
                output=$(do_facet mds$num lctl get_param -n \
-                        osc.$mdtosc.$PROC_CON 2>/dev/null)
+                        os[cp].$mdtosc.$PROC_CON 2>/dev/null)
                local outcon=$(count_contexts "$output")
                if [ "$outcon" -lt "$tmpcnt" ]; then
                        tmpcnt=$outcon