iscsi: do iscsi_firmware regardless of network

Do the iscsi_firmware iscsistart at least once, even if the network is
not up, to activate offload HBA iSCSI.

https://bugzilla.redhat.com/show_bug.cgi?id=1031160
master
Harald Hoyer 2013-12-18 12:26:05 +01:00
parent 859e3a77d0
commit ab6f4a825e
3 changed files with 9 additions and 7 deletions

View File

@ -44,13 +44,15 @@ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
iscsi_param="$iscsi_param --param $p" iscsi_param="$iscsi_param --param $p"
done done


iscsistart -b $iscsi_param if ! [ -e /tmp/iscsistarted-firmware ] && iscsistart -b $iscsi_param; then
echo 'started' > "/tmp/iscsistarted-iscsi" echo 'started' > "/tmp/iscsistarted-iscsi"
echo 'started' > "/tmp/iscsistarted-firmware" echo 'started' > "/tmp/iscsistarted-firmware"
need_shutdown need_shutdown
exit 0 fi
[ "$netif" = dummy ] && exit 0
fi fi



handle_netroot() handle_netroot()
{ {
local iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port local iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port

View File

@ -64,7 +64,7 @@ if [ -n "$iscsi_firmware" ] ; then
netroot=${netroot:-iscsi} netroot=${netroot:-iscsi}
modprobe -q iscsi_boot_sysfs 2>/dev/null modprobe -q iscsi_boot_sysfs 2>/dev/null
modprobe -q iscsi_ibft modprobe -q iscsi_ibft
echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_firmware_started.sh initqueue --onetime --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
fi fi


# If it's not iscsi we don't continue # If it's not iscsi we don't continue

View File

@ -69,7 +69,7 @@ do_test_run() {
|| return 1 || return 1


run_client "netroot=iscsi" \ run_client "netroot=iscsi" \
"root=LABEL=sysroot ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \ "iscsi_firmware root=LABEL=sysroot ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|| return 1 || return 1
return 0 return 0