|
|
a56a5e |
From 937456c65b0e641a6494a39acb5a001b2c9ed992 Mon Sep 17 00:00:00 2001
|
|
|
966cef |
From: Harald Hoyer <harald@redhat.com>
|
|
|
966cef |
Date: Wed, 18 Dec 2013 12:26:05 +0100
|
|
|
966cef |
Subject: [PATCH] iscsi: do iscsi_firmware regardless of network
|
|
|
966cef |
|
|
|
966cef |
Do the iscsi_firmware iscsistart at least once, even if the network is
|
|
|
966cef |
not up, to activate offload HBA iSCSI.
|
|
|
966cef |
|
|
|
966cef |
https://bugzilla.redhat.com/show_bug.cgi?id=1031160
|
|
|
966cef |
---
|
|
|
966cef |
modules.d/95iscsi/iscsiroot.sh | 12 +++++++-----
|
|
|
966cef |
modules.d/95iscsi/parse-iscsiroot.sh | 2 +-
|
|
|
966cef |
test/TEST-30-ISCSI/test.sh | 2 +-
|
|
|
966cef |
3 files changed, 9 insertions(+), 7 deletions(-)
|
|
|
966cef |
|
|
|
966cef |
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
|
|
1755ca |
index 738fff44..ef090f7f 100755
|
|
|
966cef |
--- a/modules.d/95iscsi/iscsiroot.sh
|
|
|
966cef |
+++ b/modules.d/95iscsi/iscsiroot.sh
|
|
|
966cef |
@@ -44,13 +44,15 @@ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
|
|
|
966cef |
iscsi_param="$iscsi_param --param $p"
|
|
|
966cef |
done
|
|
|
966cef |
|
|
|
966cef |
- iscsistart -b $iscsi_param
|
|
|
966cef |
- echo 'started' > "/tmp/iscsistarted-iscsi"
|
|
|
966cef |
- echo 'started' > "/tmp/iscsistarted-firmware"
|
|
|
966cef |
- need_shutdown
|
|
|
966cef |
- exit 0
|
|
|
966cef |
+ if ! [ -e /tmp/iscsistarted-firmware ] && iscsistart -b $iscsi_param; then
|
|
|
966cef |
+ echo 'started' > "/tmp/iscsistarted-iscsi"
|
|
|
966cef |
+ echo 'started' > "/tmp/iscsistarted-firmware"
|
|
|
966cef |
+ need_shutdown
|
|
|
966cef |
+ fi
|
|
|
966cef |
+ [ "$netif" = dummy ] && exit 0
|
|
|
966cef |
fi
|
|
|
966cef |
|
|
|
966cef |
+
|
|
|
966cef |
handle_netroot()
|
|
|
966cef |
{
|
|
|
966cef |
local iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port
|
|
|
966cef |
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
|
|
1755ca |
index 0c8b524b..77bd9913 100755
|
|
|
966cef |
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
|
|
966cef |
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
|
|
966cef |
@@ -64,7 +64,7 @@ if [ -n "$iscsi_firmware" ] ; then
|
|
|
966cef |
netroot=${netroot:-iscsi}
|
|
|
966cef |
modprobe -q iscsi_boot_sysfs 2>/dev/null
|
|
|
966cef |
modprobe -q iscsi_ibft
|
|
|
966cef |
- echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_firmware_started.sh
|
|
|
966cef |
+ initqueue --onetime --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
|
|
|
966cef |
fi
|
|
|
966cef |
|
|
|
966cef |
# If it's not iscsi we don't continue
|
|
|
966cef |
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
|
|
1755ca |
index 4c299564..f5977839 100755
|
|
|
966cef |
--- a/test/TEST-30-ISCSI/test.sh
|
|
|
966cef |
+++ b/test/TEST-30-ISCSI/test.sh
|
|
|
966cef |
@@ -69,7 +69,7 @@ do_test_run() {
|
|
|
966cef |
|| return 1
|
|
|
966cef |
|
|
|
966cef |
run_client "netroot=iscsi" \
|
|
|
966cef |
- "root=LABEL=sysroot ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
|
|
|
966cef |
+ "iscsi_firmware root=LABEL=sysroot ip=192.168.50.101::192.168.50.1:255.255.255.0:iscsi-1:ens3:off" \
|
|
|
966cef |
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
|
|
966cef |
|| return 1
|
|
|
966cef |
return 0
|