From: John L. Hammond Date: Fri, 6 May 2022 17:06:57 +0000 (-0500) Subject: LU-10994 test: remove netdisk from obdfilter-survey X-Git-Tag: 2.15.51~105 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=51c491dac6aec99fc328732b4358e8d5732dc230;p=fs%2Flustre-release.git LU-10994 test: remove netdisk from obdfilter-survey Remove the netdisk case from obdfilter-survey. Remove subtests that use echo_client over osc devices. Signed-off-by: John L. Hammond Change-Id: I260001241cee3027f68e62077e5817221bd0c08b Reviewed-on: https://review.whamcloud.com/47239 Reviewed-by: Patrick Farrell Tested-by: jenkins Tested-by: Maloo Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin --- diff --git a/lustre-iokit/obdfilter-survey/iokit-libecho b/lustre-iokit/obdfilter-survey/iokit-libecho index dc4e035..03c205c 100644 --- a/lustre-iokit/obdfilter-survey/iokit-libecho +++ b/lustre-iokit/obdfilter-survey/iokit-libecho @@ -174,17 +174,6 @@ get_devnos () { return 0 } -# do cleanup for netdisk case. -cleanup_netdisk () { - for osc in $@; do - $lctl <<-EOF - cfg_device $osc - cleanup - detach - EOF - done -} - # do cleanup for network case. cleanup_network () { local clean_srv_OSS=$1 @@ -241,10 +230,6 @@ cleanup () { if [ $case == "network" ]; then cleanup_network $1 fi - if [ $case == "netdisk" ]; then - shift - cleanup_netdisk $@ - fi if [ $exit_status ]; then if [ $exit_status -ne 0 ]; then echo "program exited with error " @@ -256,7 +241,7 @@ cleanup () { fi exit $exit_status } -trap 'cleanup 0 $clean_srv_OSS $cleanup_oscs' EXIT SIGHUP SIGINT SIGTERM +trap 'cleanup 0 $clean_srv_OSS' EXIT SIGHUP SIGINT SIGTERM # gets echoclient device number and attach it to the client UUID # Results are returned by an echo followed by an exit @@ -310,19 +295,6 @@ get_ec_devno () { exit 0 } -# Create echo-clients using osc_names and osc_uuid -# It creates echoclients for all osc listed using #lctl device_list command -ec_using_osc () { - local osc_name=$1 - - $lctl <<-EOF - attach echo_client ${osc_name}_ecc ${osc_name}_ecc_UUID - cfg_device ${osc_name}_ecc - setup $osc_name - EOF - -} - # create echo client using server nid. ec_using_srv_nid () { local server_nid=$1 @@ -341,19 +313,6 @@ ec_using_srv_nid () { EOF } -setup_osc_for_remote_ost () { - local ost_nid=$1 - local obdfilter_name=$2 - local host_name=host_$3 - - $lctl add_uuid ${host_name}_UUID $ost_nid@$NETTYPE >/dev/null 2>&1 - $lctl <<-EOF - attach osc ${obdfilter_name}_osc ${obdfilter_name}_osc_UUID - cfg_device ${obdfilter_name}_osc - setup ${obdfilter_name}_UUID ${host_name}_UUID - EOF -} - # setup obdecho on server setup_srv_obd () { local server_nid=$1 diff --git a/lustre-iokit/obdfilter-survey/obdfilter-survey b/lustre-iokit/obdfilter-survey/obdfilter-survey index adb5b6b..03239c8 100755 --- a/lustre-iokit/obdfilter-survey/obdfilter-survey +++ b/lustre-iokit/obdfilter-survey/obdfilter-survey @@ -10,10 +10,10 @@ # ... use 'host:name' for obd instances on other nodes. # allow these to be passed in via string... # OR -# one can specify only case=disk or case=network or case=netdisk through +# one can specify only case=disk or case=network through # command line. -# Prerequisite: For "disk" case and "netdisk" case you need to have lustre setup +# Prerequisite: For "disk" case you need to have lustre setup # with one or more ost's. For "network" case you need to have all # modules (those llmount.sh loades) loaded in kernel. And the # 'lctl dl' output must be blank. @@ -27,10 +27,6 @@ # $ nobjhi=2 thrhi=2 size=1024 targets="" case=network sh obdfilter-survey # where, targets is name or ip address of system, which you want to # set as server. -# case 3 (network and disk): -# $ nobjhi=2 thrhi=2 size=1024 case=netdisk sh obdfilter-survey -# one can also run test with user defined targets as follows, -# $ nobjhi=2 thrhi=2 size=1024 targets=" ..." sh obdfilter-survey #[ NOTE: It is advised to have automated login (passwordless entry) between server and # client systems on which this test runs.] @@ -360,52 +356,6 @@ if [ $case == "disk" ]; then ost_names[$i]=${client_names[$i]} done fi -if [ $case == "netdisk" ]; then - if [ "$targets" ]; then - for ((i = 0; i < $ndevs; i++)); do - setup_osc_for_remote_ost ${host_names[$i]} \ - ${client_names[$i]} $i - osc_name=${client_names[$i]}_osc - ec_using_osc $osc_name - cleanup_oscs="$cleanup_oscs $osc_name" - done - else - client_names_str=$($lctl dl | grep -v mdt | - awk '{if ($2 == "UP" && $3 == "osc") {print $4} }') - count=0; - for name in $client_names_str; do - client_names[$count]=$(echo $name | sed 's/-osc-.*$//') - count=$((count + 1)) - done - - host_names_str=$($lctl dl -t | grep -v mdt | - awk '{if ($2 == "UP" && $3 == "osc") {print $7} }') - count=0; - for name in $host_names_str; do - host_names[$count]=$(echo $name | sed 's/@.*$//') - count=$((count + 1)) - done - - for (( i = 0; i < $count; i++ )) do - setup_osc_for_remote_ost ${host_names[$i]} \ - ${client_names[$i]} $i - osc_name=${client_names[$i]}_osc - ec_using_osc $osc_name - cleanup_oscs="$cleanup_oscs $osc_name" - done - fi - - echo_clients=$($lctl dl | grep echo_client | - awk "{if (\$2 == \"UP\" && \$3 == \"echo_client\") { \ - print \$4} }") - cnt=0; - for name in $echo_clients; do - client_names[$cnt]=$name - host_names[$cnt]=localhost - cnt=$((cnt + 1)) - done - ndevs=${#client_names[@]} -fi if [ $case == "network" ]; then server_nid=$targets if [ -z "$server_nid" ]; then @@ -478,7 +428,7 @@ for ((i=0; i < $ndevs; i++)); do done if (($ndevs <= 0 || ${#host_names[@]} <= 0)); then echo "no devices or hosts specified" - cleanup 0 $clean_srv_OSS $cleanup_oscs + cleanup 0 $clean_srv_OSS fi print_summary "$(date) Obdfilter-survey for case=$case from $(hostname)" @@ -637,5 +587,5 @@ for ((rsz = $rszlo; rsz <= $rszhi; rsz*=2)); do done # $thr done # $nobj done # $rsz -cleanup 0 $clean_srv_OSS $cleanup_oscs +cleanup 0 $clean_srv_OSS exit 0 diff --git a/lustre/tests/obdfilter-survey.sh b/lustre/tests/obdfilter-survey.sh index 23e2156..059694e 100644 --- a/lustre/tests/obdfilter-survey.sh +++ b/lustre/tests/obdfilter-survey.sh @@ -60,7 +60,6 @@ obdflter_survey_targets () { case $case in disk) targets=$(get_targets $case);; - netdisk) targets=$(get_targets $case);; network) targets=$(host_nids_address $(comma_list $(osts_nodes)) $NETTYPE);; *) error "unknown obdflter-survey case!" ;; esac @@ -117,29 +116,12 @@ test_1c () { run_test 1c "Object Storage Targets survey, big batch" test_2a () { - obdflter_survey_run netdisk + skip "netdisk was removed" } run_test 2a "Stripe F/S over the Network" test_2b () { - local param_file=$TMP/$tfile-params - - do_nodesv $(comma_list $(osts_nodes)) \ - $LCTL get_param obdfilter.${FSNAME}-*.sync_journal - save_lustre_params $(get_facets OST) \ - "obdfilter.${FSNAME}-*.sync_journal" > $param_file - do_nodesv $(comma_list $(osts_nodes)) \ - $LCTL set_param obdfilter.${FSNAME}-*.sync_journal=0 - - local stime=$(date +%s) - thrlo=4 nobjhi=1 thrhi=4 obdflter_survey_run netdisk - local etime=$(date +%s) - local rtime=$((etime - stime)) - - echo "obd survey finished in $rtime seconds" - restore_lustre_params < $param_file - - rm -f $param_file + skip "netdisk was removed" } run_test 2b "Stripe F/S over the Network, async journal" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 76476c2..b821de4 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -17752,33 +17752,7 @@ obdecho_test() { } test_180a() { - [ $PARALLEL == "yes" ] && skip "skip parallel run" - - if ! [ -d /sys/fs/lustre/echo_client ] && - ! module_loaded obdecho; then - load_module obdecho/obdecho && - stack_trap "rmmod obdecho" EXIT || - error "unable to load obdecho on client" - fi - - local osc=$($LCTL dl | grep -v mdt | awk '$3 == "osc" {print $4; exit}') - local host=$($LCTL get_param -n osc.$osc.import | - awk '/current_connection:/ { print $2 }' ) - local target=$($LCTL get_param -n osc.$osc.import | - awk '/target:/ { print $2 }' ) - target=${target%_UUID} - - if [ -n "$target" ]; then - setup_obdecho_osc $host $target && - stack_trap "cleanup_obdecho_osc $target" EXIT || - { error "obdecho setup failed with $?"; return; } - - obdecho_test ${target}_osc client || - error "obdecho_test failed on ${target}_osc" - else - $LCTL get_param osc.$osc.import - error "there is no osc.$osc.import target" - fi + skip "obdecho on osc is no longer supported" } run_test 180a "test obdecho on osc" diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index d2d458b..ebb7e04 100755 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -835,40 +835,7 @@ test_27() { run_test 27 "align non-overlapping extent locks from request ===" test_28() { # bug 9977 - ECHO_UUID="ECHO_osc1_UUID" - tOST=$($LCTL dl | awk '/-osc-|OSC.*MNT/ { print $4 }' | head -n1) - - $LFS setstripe $DIR1/$tfile -S 1048576 -i 0 -c 2 - tOBJID=`$LFS getstripe $DIR1/$tfile | awk '$1 == 1 {print $2}'` - dd if=/dev/zero of=$DIR1/$tfile bs=1024k count=2 - - $LCTL <<-EOF - newdev - attach echo_client ECHO_osc1 $ECHO_UUID - setup $tOST - EOF - - tECHOID=`$LCTL dl | grep $ECHO_UUID | awk '{ print $1 }'` - $LCTL --device $tECHOID destroy "${tOBJID}:0" - - $LCTL <<-EOF - cfg_device ECHO_osc1 - cleanup - detach - EOF - - # reading of 1st stripe should pass - dd if=$DIR2/$tfile of=/dev/null bs=1024k count=1 || error "dd failed" - # reading of 2nd stripe should fail (this stripe was destroyed) - dd if=$DIR2/$tfile of=/dev/null bs=1024k count=1 skip=1 && error - - # now, recreating test file - dd if=/dev/zero of=$DIR1/$tfile bs=1024k count=2 || error "dd failed" - # reading of 1st stripe should pass - dd if=$DIR2/$tfile of=/dev/null bs=1024k count=1 || error "dd failed" - # reading of 2nd stripe should pass - dd if=$DIR2/$tfile of=/dev/null bs=1024k count=1 skip=1 || - error "dd failed" + skip "echo_client on osc is no longer supported" } run_test 28 "read/write/truncate file with lost stripes"