dracut/0197-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch
Thomas Renninger 2e0abbdaf2 Accepting request 400457 from home:trenn
- FCOE fix bsc#982588
  * Add 0212-fcoe_reorder_init_path.patch

- Port missing SLES patches
  * Add 0197-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch
  * Add 0198-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch
  * Remove 0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch
  * Remove 0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch
- Rewrite patch:
  * Add 0302-Revert-90multipath-add-hostonly-multipath.conf-in-ca.patch
  * Remove 0001-multipath_revert_mpathconf_binary_use.patch
- Update 0403-95lunmask-Add-module-to-handle-LUN-masking.patch
  to match upstream kernel submission (FATE#319786)

- Add IFS restoring where it has been lost due to mainline merging
  (bsc#977117)
*Add 0500-Reset-IFS-variable.patch

- Make sure to install collect binary (bsc#976466)
* Add: 0188-95dasd_rules-Install-collect-udev-helper-binary.patch

- Remove version from requires on subpackage
- Add a split provide because of the package split for SLE12 SP1 to SP2 upgrade

  * 0001-multipath_revert_mpathconf_binary_use.patch (fate#320499)
  * 0170-iscsi-skip-ibft-invalid-dhcp.patch (bsc#953361)
  * 0160-s390-update_active_devices_initrd.patch (bsc#939101)
  * 0161-95zfcp_rules-simplified-rd.zfcp-commandline-for-NPIV.patch (bsc#964456)
  * 0190-replace-iscsistart-with-systemd-service-files.patch (fate#319024)
  * 0191-static_network_setup_return_zero.patch (bsc#919179)

OBS-URL: https://build.opensuse.org/request/show/400457
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=258
2016-06-07 13:51:45 +00:00

71 lines
2.5 KiB
Diff

From 4287dca195e2435c7ab20265db6225f97b576fd3 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Mon, 19 Oct 2015 14:02:19 +0200
Subject: 95iscsi: Do not require network for qla4xxx flash sessions
qla4xxx can store boot sessions in flash, which will then
not show up with iBFT. These boot sesssions will be maintained
by the driver; no specific network configuration is required
here. So suppress network setup for these cases.
References: bsc#935320
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/95iscsi/module-setup.sh | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index 6dca212..797d4e1 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -70,7 +70,7 @@ install_ibft() {
install_iscsiroot() {
local devpath=$1
- local scsi_path iscsi_lun session c d conn
+ local scsi_path iscsi_lun session c d conn host flash
local iscsi_session iscsi_address iscsi_port iscsi_targetname iscsi_tpgt
scsi_path=${devpath%%/block*}
@@ -81,6 +81,19 @@ install_iscsiroot() {
[ "$session" = "$devpath" ] && return 1
iscsi_session=${session##*/}
[ "$iscsi_session" = "$session" ] && return 1
+ host=${session%%/session*}
+ [ "$host" = "$session" ] && return 1
+ iscsi_host=${host##*/}
+
+ for flash in ${host}/flashnode_sess-* ; do
+ is_boot=$(cat $flash/is_boot_target)
+ if [ $is_boot -eq 1 ] ; then
+ # qla4xxx flashnode session; skip iBFT discovery
+ iscsi_initiator=$(cat /sys/class/iscsi_host/${iscsi_host}/initiatorname)
+ echo "rd.iscsi.initiator=${iscsi_initiator}"
+ return;
+ fi
+ done
for d in ${session}/* ; do
case $d in
@@ -135,6 +148,7 @@ install_iscsiroot() {
# can sort out rd.iscsi.initiator= duplicates
echo "rd.iscsi.initiator=${iscsi_initiator}"
echo "netroot=iscsi:${iscsi_address}::${iscsi_port}:${iscsi_lun}:${iscsi_targetname}"
+ echo "rd.neednet=1"
fi
return 0
}
@@ -241,8 +255,6 @@ install() {
[[ $_iscsiconf ]] && printf "%s\n" "$_iscsiconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
fi
- echo 'rd.neednet=1' >> "${initdir}/etc/cmdline.d/95iscsi.conf"
-
inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
--
2.6.6