device-mapper-multipath-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
This commit is contained in:
Benjamin Marzinski 2024-08-01 16:11:58 -04:00
parent 4512f00ef1
commit af6a90b92d
6 changed files with 52 additions and 45 deletions

View File

@ -1,6 +1,6 @@
Name: device-mapper-multipath Name: device-mapper-multipath
Version: 0.8.7 Version: 0.8.7
Release: 30%{?dist} Release: 31%{?dist}
Summary: Tools to manage multipath devices using device-mapper Summary: Tools to manage multipath devices using device-mapper
License: GPLv2 License: GPLv2
URL: http://christophe.varoqui.free.fr/ URL: http://christophe.varoqui.free.fr/
@ -334,6 +334,12 @@ fi
%{_pkgconfdir}/libdmmp.pc %{_pkgconfdir}/libdmmp.pc
%changelog %changelog
* Tue Jul 30 2024 Benjamin Marzinski <bmarzins@redhat.com> - 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 <bmarzins@redhat.com> - 0.8.7-30 * Tue Jul 30 2024 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.7-30
- Add 0120-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch - Add 0120-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch
* Fixes RHEL-28068 * Fixes RHEL-28068

View File

@ -33,7 +33,7 @@ sleep 5
terr "modprobe -r scsi_debug" terr "modprobe -r scsi_debug"
terr "modprobe scsi_debug num_tgts=1 vpd_use_hostno=0 add_host=2 delay=20 \ terr "modprobe scsi_debug num_tgts=1 vpd_use_hostno=0 add_host=2 delay=20 \
max_luns=2 no_lun_0=1" max_luns=2 no_lun_0=1"
sleep 60 sleep 5
disk_path=$(get_scsi_debug_devices) disk_path=$(get_scsi_debug_devices)
disk=$(basename $disk_path) disk=$(basename $disk_path)

View File

@ -101,7 +101,7 @@ trun "modprobe -r scsi_debug"
# test find_multipaths=y create device for paths have same wwid # 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" 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_paths=$(get_scsi_debug_devices)
disk_node=$(basename $disk_paths) disk_node=$(basename $disk_paths)
mpath_name=$(get_mpath_disk_by_scsi_device $disk_node) mpath_name=$(get_mpath_disk_by_scsi_device $disk_node)

View File

@ -44,9 +44,12 @@ function _init (){
} }
function _destroy (){ function _destroy (){
sleep 10 Cmd "multipathd disablequeueing maps"
Cmd "multipath -F"
sleep 5 sleep 5
Cmd "multipath -DF -R2"
Cmd "service multipathd stop"
sleep 5
Cmd "udevadm settle"
Cmd "modprobe -r scsi_debug" Cmd "modprobe -r scsi_debug"
} }
@ -174,10 +177,7 @@ AA
fi fi
#setup scsi_debug #setup scsi_debug
echo "INFO: Loading scsi_debug module for simulation of mpath" echo "INFO: Loading scsi_debug module for simulation of mpath"
modprobe scsi_debug \ modprobe scsi_debug vpd_use_hostno=0 add_host=2
num_tgts=1 vpd_use_hostno=0 \
add_host=4 delay=20 \
max_luns=2 no_lun_0=1 2>&1 1>/dev/null
echo "INFO: Waiting for udev to create /dev/sdX" echo "INFO: Waiting for udev to create /dev/sdX"
sleep 15s #wait 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 cat << AA > /etc/multipath.conf
defaults { defaults {
#Enable multibus is for mutlbus testing #Enable multibus is for mutlbus testing
path_grouping_policy multibus
user_friendly_names yes user_friendly_names yes
} }
blacklist { blacklist {

View File

@ -16,47 +16,51 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Author: LiLin <lilin@redhat.com> # Author: LiLin <lilin@redhat.com>
source ../include/tc.sh || exit 200
function cleanup() cleanup()
{ {
sleep 5 sleep 5
udevadm settle udevadm settle
multipath -F trun "multipath -DF"
sleep 5 sleep 5
modprobe -r scsi_debug trun "modprobe -r scsi_debug"
return 0
} }
yum -y install device-mapper device-mapper-multipath assert ()
mpathconf --enable {
service multipathd stop local cmd="$*"
modprobe scsi_debug num_tgts=1 vpd_use_hostno=0 add_host=2 delay=20 max_luns=2 no_lun_0=1 opts=2 _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 sleep 5
multipath > /dev/null trun "multipath"
sleep 5 sleep 5
trun "multipath -l"
mpathdev=`multipath -l | grep scsi_debug | awk '{print $1}' | head -1` mpathdev=`multipath -l | grep scsi_debug | awk '{print $1}' | head -1`
if [ -z "$mpathdev" ]; then assert "[[ -n \"$mpathdev\" ]]"
echo "------- FAIL, no multipath device created -----"
cleanup
exit 1
fi
before_active=`multipath -l $mpathdev | grep "active undef" | wc -l` 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" ` 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 assert "[[ -n \"$IO_error\" ]]"
after_active=`multipath -l $mpathdev | grep "active undef" | wc -l` after_active=`multipath -l $mpathdev | grep "active undef" | wc -l`
if [ "$before_active" -eq "$after_active" ]; then tlog "after active = ${after_active}"
echo "------- PASS, a medium error, correctly generated an I/O error and did not fail paths -----" assert "[[ \"$before_active\" -eq \"$after_active\" ]]"
cleanup cleanup
exit 0 tend
else
echo "------- FAIL, paths failed -----"
cleanup
exit 1
fi
else
echo "------- FAIL, did not generate an I/O error -----"
cleanup
exit 1
fi

View File

@ -48,10 +48,8 @@ rpm -q device-mapper-multipath || yum install -y device-mapper-multipath
tlog "device-mapper-multipath is installed" tlog "device-mapper-multipath is installed"
# cleanup existing devices # cleanup existing devices
trun "rm /etc/multipath.conf" trun "rm /etc/multipath.conf"
trun "mpathconf --enable --with_module y" trun "mpathconf --enable --with_module y --option max_polling_interval:10"
sed -i '/^defaults[[:space:]]*{/ a\ trun "mpathconf --option detect_pgpolicy_use_tpg:yes"
max_polling_interval 10
' /etc/multipath.conf
trun "service multipathd stop" trun "service multipathd stop"
trun "multipath -F" trun "multipath -F"
sleep 5 sleep 5