Fix the version checks for the following patches:
Fixes:
fec78d4568 ("LU-18114 lctl: split "lctl net_delay_*" group into subcommands")
Fixes:
79a76faa48 ("LU-18114 lctl: split "lctl net_drop_*" group into subcommands")
Fixes:
77e98c10b3 ("LU-18114 changelog: split "lctl changelog_*" group into subcommands
Fixes:
166c48c1c3 ("LU-18114 snapshot: split "lctl snapshot_*" group into subcommands")
Fixes:
441adeced3 ("LU-18114 barrier: split "lctl barrier_*" group into subcommands")
Fixes:
89b0bcdab5 ("LU-18114 lfsck: split "lctl lfsck_*" group into subcommands")
Test-Parameters: trivial testlist=sanity-lnet serverversion=2.16
Test-Parameters: trivial testlist=sanity env=ONLY="60i 801c" serverversion=2.16
Test-Parameters: trivial fstype=zfs testlist=sanity-lsnapshot serverversion=2.16
Test-Parameters: trivial testlist=sanity-lfsck env=ONLY=12a serverversion=2.16
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I16786e31113a4bd6c8e2e334afa10a795d0b03d9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57824
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frederick Dilger <fdilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
(( $MDS1_VERSION > $(version_code 2.5.55) )) ||
skip "MDS older than 2.5.55, LU-3950"
- if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then
+ if (( $MDS1_VERSION >= $(version_code 2.15.90) )); then
lfsck_start="lfsck start"
lfsck_stop="lfsck stop"
else
add_health_test_drop_rules() {
local args="-m GET -r 1 -e ${1}"
local src dst
- if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then
- net_drop_add="net_drop add"
- else
- net_drop_add="net_drop_add"
- fi
for src in "${LNIDS[@]}"; do
for dst in "${RNIDS[@]}" "${LNIDS[@]}"; do
- $LCTL $net_drop_add -s $src -d $dst ${args} ||
+ $LCTL net_drop add -s $src -d $dst ${args} ||
error "Failed to add drop rule $src $dst $args"
done
done
do_lnet_health_ping_test() {
local hstatus="$1"
- if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then
- net_drop_del="net_drop del"
- else
- net_drop_del="net_drop_del"
- fi
echo "Simulate $hstatus"
lnet_health_post
- $LCTL $net_drop_del -a
+ $LCTL net_drop del -a
return 0
}
delay=$((tto + 1))
- if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then
- net_delay_add="net_delay add"
- net_delay_del="net_delay del"
- else
- net_delay_add="net_delay_add"
- net_delay_del="net_delay_del"
- fi
-
for lnid in "${LNIDS[@]}"; do
for rnid in "${RNIDS[@]}"; do
- $LCTL $net_delay_add -s "${lnid}" -d "${rnid}" \
+ $LCTL net_delay add -s "${lnid}" -d "${rnid}" \
-l "${delay}" -r 1 -m GET ||
error "Failed to add delay rule"
done
sleep ${delay}
- $LCTL $net_delay_del -a
+ $LCTL net_delay del -a
wait
}
barrier_stat() {
- if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then
+ if (( $MDS1_VERSION >= $(version_code 2.16.50) )); then
barrier_stat="barrier stat"
else
barrier_stat="barrier_stat"
test_801c() {
[[ $MDSCOUNT -lt 2 ]] && skip_env "needs >= 2 MDTs"
- if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then
+ if (( $MDS1_VERSION >= $(version_code 2.16.50) )); then
barrier_freeze="barrier freeze"
barrier_thaw="barrier thaw"
barrier_rescan="barrier rescan"
local cmd=$1
shift
- if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then
+ if (( $MDS1_VERSION >= $(version_code 2.16.50) )); then
do_facet mgs "$LCTL snapshot $cmd -F $FSNAME $*"
else
do_facet mgs "$LCTL snapshot_$cmd -F $FSNAME $*"
local cl_user=$2
local rc=0
- if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then
+ if (( $MDS1_VERSION >= $(version_code 2.16.50) )); then
changelog_deregister="changelog deregister"
else
changelog_deregister="changelog_deregister"
declare -Ax CL_USERS
changelog_register() {
- if (( $MDS1_VERSION >= $(version_code 2.15.65) )); then
+ if (( $MDS1_VERSION >= $(version_code 2.16.50) )); then
changelog_register="changelog register"
else
changelog_register="changelog_register"