diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index bf2290d..f04b50f 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -1,6 +1,6 @@ Name: device-mapper-multipath Version: 0.8.7 -Release: 30%{?dist} +Release: 31%{?dist} Summary: Tools to manage multipath devices using device-mapper License: GPLv2 URL: http://christophe.varoqui.free.fr/ @@ -334,6 +334,12 @@ fi %{_pkgconfdir}/libdmmp.pc %changelog +* Tue Jul 30 2024 Benjamin Marzinski - 0.8.7-30 +- Modify multiple tests especially medium_error_scsi_debug and squelch_scsi_id + * Fixes RHEL-28068 & RHEL-4459 +- Resolves: RHEL-28068 +- Resolves: RHEL-44569 + * Tue Jul 30 2024 Benjamin Marzinski - 0.8.7-30 - Add 0120-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch * Fixes RHEL-28068 diff --git a/tests/bindings/main.sh b/tests/bindings/main.sh index 2d6f284..37ceded 100755 --- a/tests/bindings/main.sh +++ b/tests/bindings/main.sh @@ -33,7 +33,7 @@ sleep 5 terr "modprobe -r scsi_debug" terr "modprobe scsi_debug num_tgts=1 vpd_use_hostno=0 add_host=2 delay=20 \ max_luns=2 no_lun_0=1" -sleep 60 +sleep 5 disk_path=$(get_scsi_debug_devices) disk=$(basename $disk_path) diff --git a/tests/find_multipaths/main.sh b/tests/find_multipaths/main.sh index 4d94c87..b857787 100755 --- a/tests/find_multipaths/main.sh +++ b/tests/find_multipaths/main.sh @@ -101,7 +101,7 @@ trun "modprobe -r scsi_debug" # test find_multipaths=y create device for paths have same wwid tok "modprobe scsi_debug num_tgts=1 vpd_use_hostno=0 add_host=2 delay=20 max_luns=2 no_lun_0=1" -sleep 10 +sleep 5 disk_paths=$(get_scsi_debug_devices) disk_node=$(basename $disk_paths) mpath_name=$(get_mpath_disk_by_scsi_device $disk_node) diff --git a/tests/include/ec.sh b/tests/include/ec.sh index 22dfc40..3cd4b60 100755 --- a/tests/include/ec.sh +++ b/tests/include/ec.sh @@ -44,9 +44,12 @@ function _init (){ } function _destroy (){ - sleep 10 - Cmd "multipath -F" + Cmd "multipathd disablequeueing maps" sleep 5 + Cmd "multipath -DF -R2" + Cmd "service multipathd stop" + sleep 5 + Cmd "udevadm settle" Cmd "modprobe -r scsi_debug" } @@ -174,10 +177,7 @@ AA fi #setup scsi_debug echo "INFO: Loading scsi_debug module for simulation of mpath" - modprobe scsi_debug \ - num_tgts=1 vpd_use_hostno=0 \ - add_host=4 delay=20 \ - max_luns=2 no_lun_0=1 2>&1 1>/dev/null + modprobe scsi_debug vpd_use_hostno=0 add_host=2 echo "INFO: Waiting for udev to create /dev/sdX" sleep 15s #wait for udev to create /dev/sdX @@ -190,7 +190,6 @@ AA cat << AA > /etc/multipath.conf defaults { #Enable multibus is for mutlbus testing - path_grouping_policy multibus user_friendly_names yes } blacklist { diff --git a/tests/medium_error_scsi_debug/main.sh b/tests/medium_error_scsi_debug/main.sh index db2f008..35c6e6f 100755 --- a/tests/medium_error_scsi_debug/main.sh +++ b/tests/medium_error_scsi_debug/main.sh @@ -16,47 +16,51 @@ # along with this program. If not, see . # Author: LiLin +source ../include/tc.sh || exit 200 -function cleanup() +cleanup() { sleep 5 udevadm settle - multipath -F + trun "multipath -DF" sleep 5 - modprobe -r scsi_debug - - return 0 + trun "modprobe -r scsi_debug" } -yum -y install device-mapper device-mapper-multipath -mpathconf --enable -service multipathd stop -modprobe scsi_debug num_tgts=1 vpd_use_hostno=0 add_host=2 delay=20 max_luns=2 no_lun_0=1 opts=2 +assert () +{ + local cmd="$*" + _trun_ "$cmd" 0 + if test $? -eq 0; then + tpass_ "$cmd" ; + else + tfail_ "$cmd" ; + cleanup ; + tend ; + fi +} + +tlog "running $0" +rpm -q device-mapper-multipath || dnf install -y device-mapper-multipath +trun "multipathd disablequeueing maps" +cleanup +trun "service multipathd stop" +trun "rm -f /etc/multipath.conf" +trun "mpathconf --enable" +trun "modprobe scsi_debug vpd_use_hostno=0 add_host=2 opts=2" sleep 5 -multipath > /dev/null +trun "multipath" sleep 5 +trun "multipath -l" mpathdev=`multipath -l | grep scsi_debug | awk '{print $1}' | head -1` -if [ -z "$mpathdev" ]; then - echo "------- FAIL, no multipath device created -----" - cleanup - exit 1 -fi +assert "[[ -n \"$mpathdev\" ]]" before_active=`multipath -l $mpathdev | grep "active undef" | wc -l` +tlog "before active = ${before_active}" IO_error=`dd if=/dev/zero of=/dev/mapper/$mpathdev bs=1024 seek=2330 count=10 2>&1 | grep -o "Input/output error" ` -if [ -n "$IO_error" ];then - after_active=`multipath -l $mpathdev | grep "active undef" | wc -l` - if [ "$before_active" -eq "$after_active" ]; then - echo "------- PASS, a medium error, correctly generated an I/O error and did not fail paths -----" - cleanup - exit 0 - else - echo "------- FAIL, paths failed -----" - cleanup - exit 1 - fi -else - echo "------- FAIL, did not generate an I/O error -----" - cleanup - exit 1 -fi +assert "[[ -n \"$IO_error\" ]]" +after_active=`multipath -l $mpathdev | grep "active undef" | wc -l` +tlog "after active = ${after_active}" +assert "[[ \"$before_active\" -eq \"$after_active\" ]]" +cleanup +tend diff --git a/tests/restate_module/main.sh b/tests/restate_module/main.sh index 565e59c..be60eba 100755 --- a/tests/restate_module/main.sh +++ b/tests/restate_module/main.sh @@ -48,10 +48,8 @@ rpm -q device-mapper-multipath || yum install -y device-mapper-multipath tlog "device-mapper-multipath is installed" # cleanup existing devices trun "rm /etc/multipath.conf" -trun "mpathconf --enable --with_module y" -sed -i '/^defaults[[:space:]]*{/ a\ - max_polling_interval 10 -' /etc/multipath.conf +trun "mpathconf --enable --with_module y --option max_polling_interval:10" +trun "mpathconf --option detect_pgpolicy_use_tpg:yes" trun "service multipathd stop" trun "multipath -F" sleep 5