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