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
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 <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
- Add 0120-multipath-tools-fix-multipath-ll-bug-for-Native-NVME.patch
* Fixes RHEL-28068

View File

@ -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)

View File

@ -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)

View File

@ -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 {

View File

@ -16,47 +16,51 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Author: LiLin <lilin@redhat.com>
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

View File

@ -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