From c2f43d4c7a609def4292c5b9bee63c9a33cb4598 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Tue, 11 Jun 2019 11:39:17 -0400 Subject: [PATCH] LU-8066 tests: use lod / osp tunables on servers 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. Change-Id: I9dd562cd74d68aaa0226d5ab93042b52193604a1 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/35185 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Ben Evans Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 10 +++++----- lustre/tests/replay-single.sh | 32 ++++++++++++++++---------------- lustre/tests/sanity.sh | 32 ++++++++++++++++---------------- lustre/tests/test-framework.sh | 6 +++--- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 7e07859..860cefb 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -1180,8 +1180,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)) @@ -4954,7 +4954,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 @@ -5957,7 +5957,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 @@ -5966,7 +5966,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. diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 2bf9555..08b4a6c 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -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" $LFS setstripe -i 0 -c 1 $DIR/$tdir/${OST} || @@ -3226,11 +3226,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..." @@ -3242,8 +3242,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 () @@ -3266,8 +3266,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 diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index fa0e3fe..e6ef37f 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -1743,7 +1743,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 } @@ -1777,12 +1777,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} $LFS setstripe -i $OSTIDX -c 1 $DIR/$tdir/${OST} @@ -1790,7 +1790,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 } @@ -2033,9 +2033,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 @@ -5099,7 +5099,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) @@ -9589,7 +9589,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 @@ -9710,17 +9710,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" @@ -15183,9 +15183,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 @@ -15211,9 +15211,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 diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 78b8c32..6227c18 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -7078,7 +7078,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 @@ -7770,12 +7770,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 -- 1.8.3.1