From bedbf924329e6ebd72ab141b68a7c53bed6675ba22bfb123c0248c4ca8ddf543 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Tue, 12 Apr 2016 14:08:19 +0000 Subject: [PATCH 1/3] - Forward port of latest SLES patches (fate#320499) Add: * 0170-iscsi-skip-ibft-invalid-dhcp.patch * 0160-s390-update_active_devices_initrd.patch * 0161-95zfcp_rules-simplified-rd.zfcp-commandline-for-NPIV.patch * 0190-replace-iscsistart-with-systemd-service-files.patch * 0191-static_network_setup_return_zero.patch * 0192-iscsi_set_boot_protocol_from_ifcfg.patch * 0193-95iscsi-Set-number-of-login-retries.patch * 0403-95lunmask-Add-module-to-handle-LUN-masking.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=256 --- 0160-s390-update_active_devices_initrd.patch | 25 +++ ...plified-rd.zfcp-commandline-for-NPIV.patch | 94 ++++++++ 0170-iscsi-skip-ibft-invalid-dhcp.patch | 13 ++ ...scsistart-with-systemd-service-files.patch | 186 ++++++++++++++++ 0191-static_network_setup_return_zero.patch | 40 ++++ 0192-iscsi_set_boot_protocol_from_ifcfg.patch | 27 +++ ...-95iscsi-Set-number-of-login-retries.patch | 89 ++++++++ 0402-driver-fail-summary.patch | 14 +- ...ask-Add-module-to-handle-LUN-masking.patch | 205 ++++++++++++++++++ dracut.changes | 14 ++ dracut.spec | 40 +++- 11 files changed, 735 insertions(+), 12 deletions(-) create mode 100644 0160-s390-update_active_devices_initrd.patch create mode 100644 0161-95zfcp_rules-simplified-rd.zfcp-commandline-for-NPIV.patch create mode 100644 0170-iscsi-skip-ibft-invalid-dhcp.patch create mode 100644 0190-replace-iscsistart-with-systemd-service-files.patch create mode 100644 0191-static_network_setup_return_zero.patch create mode 100644 0192-iscsi_set_boot_protocol_from_ifcfg.patch create mode 100644 0193-95iscsi-Set-number-of-login-retries.patch create mode 100644 0403-95lunmask-Add-module-to-handle-LUN-masking.patch diff --git a/0160-s390-update_active_devices_initrd.patch b/0160-s390-update_active_devices_initrd.patch new file mode 100644 index 0000000..bc37ebd --- /dev/null +++ b/0160-s390-update_active_devices_initrd.patch @@ -0,0 +1,25 @@ +From: Thomas Blume +Subject: 91zipl: Update active_devices.txt from /boot/zipl device + +References: bsc#939101 + +Signed-off-by: Thomas Blume + +Index: dracut-044/modules.d/91zipl/install_zipl_cmdline.sh +=================================================================== +--- dracut-044.orig/modules.d/91zipl/install_zipl_cmdline.sh 2016-04-12 15:48:34.620382686 +0200 ++++ dracut-044/modules.d/91zipl/install_zipl_cmdline.sh 2016-04-12 15:48:35.140412123 +0200 +@@ -22,6 +22,13 @@ if [ -f ${MNT}/dracut-cmdline.conf ] ; t + cp ${MNT}/dracut-cmdline.conf /etc/cmdline.d/99zipl.conf + fi + ++if [ -f ${MNT}/active_devices.txt ] ; then ++ while read dev etc ; do ++ [ "$dev" = "#" -o "$dev" = "" ] && continue; ++ cio_ignore -r $dev ++ done < ${MNT}/active_devices.txt ++fi ++ + umount ${MNT} + + if [ -f /etc/cmdline.d/99zipl.conf ] ; then diff --git a/0161-95zfcp_rules-simplified-rd.zfcp-commandline-for-NPIV.patch b/0161-95zfcp_rules-simplified-rd.zfcp-commandline-for-NPIV.patch new file mode 100644 index 0000000..9cc6833 --- /dev/null +++ b/0161-95zfcp_rules-simplified-rd.zfcp-commandline-for-NPIV.patch @@ -0,0 +1,94 @@ +From 61d345654fbdd895a406a5a7517f01a7c984a7ed Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 10 Mar 2016 15:45:43 +0100 +Subject: [PATCH] 95zfcp_rules: simplified rd.zfcp commandline for NPIV + +When NPIV is enabled and the allow_lun_scan parameter is set to 'Y' +the HBA will initiate a LUN scan automatically, so there is no need +to specify the WWPN and LUN number manually. + +References: bsc#964456 + +Signed-off-by: Hannes Reinecke +--- + dracut.cmdline.7.asc | 9 ++++++++- + modules.d/95zfcp_rules/module-setup.sh | 23 +++++++++++++++++++---- + modules.d/95zfcp_rules/parse-zfcp.sh | 1 + + 3 files changed, 28 insertions(+), 5 deletions(-) + +Index: dracut-044/dracut.cmdline.7.asc +=================================================================== +--- dracut-044.orig/dracut.cmdline.7.asc 2016-04-12 15:48:42.072804543 +0200 ++++ dracut-044/dracut.cmdline.7.asc 2016-04-12 15:48:46.869076048 +0200 +@@ -771,12 +771,19 @@ DASD + ZFCP + ~~~~ + **rd.zfcp=**____,____,____:: +- rd.zfcp can be specified multiple times on the kernel command line. ++ rd.zfcp can be specified multiple times on the kernel command ++ line. ++ ++**rd.zfcp=**____:: ++ If NPIV is enabled and the 'allow_lun_scan' parameter to the zfcp ++ module is set to 'Y' then the zfcp adaptor will be initiating a ++ scan internally and the and parameters can be omitted. + + + [listing] + .Example + -- + rd.zfcp=0.0.4000,0x5005076300C213e9,0x5022000000000000 ++rd.zfcp=0.0.4000 + -- + + **rd.zfcp.conf=0**:: +Index: dracut-044/modules.d/95zfcp_rules/module-setup.sh +=================================================================== +--- dracut-044.orig/modules.d/95zfcp_rules/module-setup.sh 2016-04-12 15:48:42.072804543 +0200 ++++ dracut-044/modules.d/95zfcp_rules/module-setup.sh 2016-04-12 15:48:46.869076048 +0200 +@@ -5,15 +5,30 @@ cmdline() { + is_zfcp() { + local _dev=$1 + local _devpath=$(cd -P /sys/dev/block/$_dev ; echo $PWD) +- local _sdev _lun _wwpn _ccw ++ local _sdev _scsiid _hostno _lun _wwpn _ccw _port_type ++ local _allow_lun_scan _is_npiv + ++ _allow_lun_scan=$(cat /sys/module/zfcp/parameters/allow_lun_scan) + [ "${_devpath#*/sd}" == "$_devpath" ] && return 1 + _sdev="${_devpath%%/block/*}" + [ -e ${_sdev}/fcp_lun ] || return 1 +- _lun=$(cat ${_sdev}/fcp_lun) +- _wwpn=$(cat ${_sdev}/wwpn) ++ _scsiid="${_sdev##*/}" ++ _hostno="${_scsiid%%:*}" ++ [ -d /sys/class/fc_host/host${_hostno} ] || return 1 ++ _port_type=$(cat /sys/class/fc_host/host${_hostno}/port_type) ++ case "$_port_type" in ++ NPIV*) ++ _is_npiv=1 ++ ;; ++ esac + _ccw=$(cat ${_sdev}/hba_id) +- echo "rd.zfcp=${_ccw},${_wwpn},${_lun}" ++ if [ "$_is_npiv" ] && [ "$_allow_lun_scan" = "Y" ] ; then ++ echo "rd.zfcp=${_ccw}" ++ else ++ _lun=$(cat ${_sdev}/fcp_lun) ++ _wwpn=$(cat ${_sdev}/wwpn) ++ echo "rd.zfcp=${_ccw},${_wwpn},${_lun}" ++ fi + return 0 + } + [[ $hostonly ]] || [[ $mount_needs ]] && { +Index: dracut-044/modules.d/95zfcp_rules/parse-zfcp.sh +=================================================================== +--- dracut-044.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2016-04-12 15:48:42.072804543 +0200 ++++ dracut-044/modules.d/95zfcp_rules/parse-zfcp.sh 2016-04-12 15:48:46.869076048 +0200 +@@ -31,6 +31,7 @@ ACTION=="add", SUBSYSTEM=="drivers", KER + ACTION=="add", ENV{COLLECT_$ccw}=="0", ATTR{[ccw/$ccw]online}="1" + EOF + fi ++ [ -z "$wwpn" -o -z "$lun" ] && return + m=$(sed -n "/.*${wwpn}.*${lun}.*/p" $_rule) + if [ -z "$m" ] ; then + cat >> $_rule < +Date: Mon, 19 Oct 2015 09:14:53 +0200 +Subject: Replace iscsistart with iscsiadm +References: FATE#319024 + +iscsistart allows for a single connection only, and offers no means +or terminating or re-establishing another one. +So replace iscsistart with iscsiadm to allow several connection for +multipath booting and also to ease maintenance in case of error. + +Signed-off-by: Thomas Blume +--- + modules.d/95iscsi/iscsiroot.sh | 48 ++++++++++++++++++++++++------------ + modules.d/95iscsi/module-setup.sh | 19 ++++++++++++-- + modules.d/95iscsi/parse-iscsiroot.sh | 2 +- + 3 files changed, 50 insertions(+), 19 deletions(-) + +Index: dracut-044/modules.d/95iscsi/iscsiroot.sh +=================================================================== +--- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2016-04-11 17:05:18.348326173 +0200 ++++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-11 17:38:05.939615885 +0200 +@@ -43,8 +43,8 @@ fi + + handle_firmware() + { +- if ! iscsistart -f; then +- warn "iscistart: Could not get list of targets from firmware." ++ if ! iscsiadm -m fw; then ++ warn "iscsiadm: Could not get list of targets from firmware." + return 1 + fi + +@@ -52,8 +52,8 @@ handle_firmware() + iscsi_param="$iscsi_param --param $p" + done + +- if ! iscsistart -b $iscsi_param; then +- warn "'iscsistart -b $iscsi_param' failed with return code $?" ++ if ! iscsiadm -m fw -l; then ++ warn "iscsiadm: Log-in to iscsi target failed" + fi + + echo 'started' > "/tmp/iscsistarted-iscsi:" +@@ -77,7 +77,7 @@ handle_netroot() + # override conf settings by command line options + arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) + [ -n "$arg" ] && iscsi_initiator=$arg +- arg=$(getarg rd.iscsi.target.name -d iscsi_target_name=) ++ arg=$(getargs rd.iscsi.target.name -d iscsi_target_name=) + [ -n "$arg" ] && iscsi_target_name=$arg + arg=$(getarg rd.iscsi.target.ip -d iscsi_target_ip) + [ -n "$arg" ] && iscsi_target_ip=$arg +@@ -182,45 +182,37 @@ handle_netroot() + echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh + fi + +- if [ -n "$DRACUT_SYSTEMD" ] && command -v systemd-run >/dev/null 2>&1; then +- netroot_enc=$(systemd-escape "iscsistart_${1}") +- status=$(systemctl is-active "$netroot_enc" 2>/dev/null) +- is_active=$? +- if [ $is_active -ne 0 ]; then +- if [ "$status" != "activating" ] && ! systemctl is-failed "$netroot_enc" >/dev/null 2>&1; then +- systemd-run --no-block --service-type=oneshot --remain-after-exit --quiet \ +- --description="Login iSCSI Target $iscsi_target_name" \ +- --unit="$netroot_enc" -- \ +- $(command -v iscsistart) \ +- -i "$iscsi_initiator" -t "$iscsi_target_name" \ +- -g "$iscsi_target_group" -a "$iscsi_target_ip" \ +- -p "$iscsi_target_port" \ +- ${iscsi_username:+-u "$iscsi_username"} \ +- ${iscsi_password:+-w "$iscsi_password"} \ +- ${iscsi_in_username:+-U "$iscsi_in_username"} \ +- ${iscsi_in_password:+-W "$iscsi_in_password"} \ +- ${iscsi_iface_name:+--param "iface.iscsi_ifacename=$iscsi_iface_name"} \ +- ${iscsi_netdev_name:+--param "iface.net_ifacename=$iscsi_netdev_name"} \ +- ${iscsi_param} >/dev/null 2>&1 \ +- && { > $hookdir/initqueue/work ; } ++ ### ToDo: Upstream calls systemd-run - Shall we, do we have to port this? ++ ++ if iscsiadm -m node; then ++ targets=$(iscsiadm -m node | sed 's/^.*iqn/iqn/') ++ else ++ targets=$(iscsiadm -m discovery -t st -p $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} | sed 's/^.*iqn/iqn/') ++ [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1 ++ fi ++ ++ for target in $iscsi_target_name; do ++ if [[ "$targets" =~ "$target" ]]; then ++ if [ -n "$iscsi_iface_name" ]; then ++ $(iscsiadm -m iface -I $iscsi_iface_name --op=new) ++ [ -n "$iscsi_initiator" ] && $(iscsiadm -m iface -I $iscsi_iface_name --op=update --name=iface.initiatorname --value=$iscsi_initiator) ++ [ -n "$iscsi_netdev_name" ] && $(iscsiadm -m iface -I $iscsi_iface_name --op=update --name=iface.net_ifacename --value=$iscsi_netdev_name) ++ COMMAND="iscsiadm -m node -T $target -p $iscsi_target_ip${iscsi_target_port:+:$iscsi_target_port} -I $iscsi_iface_name --op=update" + else +- systemctl --no-block restart "$netroot_enc" >/dev/null 2>&1 \ +- && { > $hookdir/initqueue/work ; } ++ COMMAND="iscsiadm -m node -T $target -p $iscsi_target_ip${iscsi_target_port:+:$iscsi_target_port} --op=update" + fi ++ $($COMMAND --name=node.startup --value=onboot) ++ [ -n "$iscsi_username" ] && $($COMMAND --name=node.session.auth.username --value=$iscsi_username) ++ [ -n "$iscsi_password" ] && $($COMMAND --name=node.session.auth.password --value=$iscsi_password) ++ [ -n "$iscsi_in_username" ] && $($COMMAND --name=node.session.auth.username_in --value=$iscsi_in_username) ++ [ -n "$iscsi_in_password" ] && $($COMMAND --name=node.session.auth.password_in --value=$iscsi_in_password) ++ [ -n "$iscsi_param" ] && $($COMMAND --name=${iscsi_param%=*} --value=${iscsi_param#*=} + fi +- else +- iscsistart -i "$iscsi_initiator" -t "$iscsi_target_name" \ +- -g "$iscsi_target_group" -a "$iscsi_target_ip" \ +- -p "$iscsi_target_port" \ +- ${iscsi_username:+-u "$iscsi_username"} \ +- ${iscsi_password:+-w "$iscsi_password"} \ +- ${iscsi_in_username:+-U "$iscsi_in_username"} \ +- ${iscsi_in_password:+-W "$iscsi_in_password"} \ +- ${iscsi_iface_name:+--param "iface.iscsi_ifacename=$iscsi_iface_name"} \ +- ${iscsi_netdev_name:+--param "iface.net_ifacename=$iscsi_netdev_name"} \ +- ${iscsi_param} \ +- && { > $hookdir/initqueue/work ; } +- fi ++ done ++ ++ iscsiadm -m node -L onboot || : ++ > $hookdir/initqueue/work ++ + netroot_enc=$(str_replace "$1" '/' '\2f') + echo 'started' > "/tmp/iscsistarted-iscsi:${netroot_enc}" + return 0 +Index: dracut-044/modules.d/95iscsi/module-setup.sh +=================================================================== +--- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2016-04-11 17:05:18.352326398 +0200 ++++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-11 17:05:31.661078953 +0200 +@@ -4,7 +4,7 @@ + check() { + local _rootdev + # If our prerequisites are not met, fail anyways. +- require_binaries iscsistart hostname iscsi-iname || return 1 ++ require_binaries hostname iscsi-iname iscsiadm iscsid || return 1 + + # If hostonly was requested, fail the check if we are not actually + # booting from root. +@@ -211,9 +211,22 @@ cmdline() { + + # called by dracut + install() { +- inst_multiple umount iscsistart hostname iscsi-iname + inst_multiple -o iscsiuio + inst_libdir_file 'libgcc_s.so*' ++ inst_multiple umount hostname iscsi-iname iscsiadm iscsid ++ ++ ln -sf $systemdsystemunitdir/iscsid.socket $systemdsystemunitdir/sockets.target.wants/iscsid.socket ++ ln -sf $systemdsystemunitdir/iscsiuio.socket $systemdsystemunitdir/sockets.target.wants/iscsiuio.socket ++ ++ inst_multiple -o \ ++ $systemdsystemunitdir/iscsid.socket \ ++ $systemdsystemunitdir/iscsid.service \ ++ $systemdsystemunitdir/iscsiuio.service \ ++ $systemdsystemunitdir/iscsiuio.socket \ ++ $systemdsystemunitdir/sockets.target.wants/iscsid.socket \ ++ $systemdsystemunitdir/sockets.target.wants/iscsiuio.socket ++ ++ [[ -d /etc/iscsi ]] && inst_dir $(/usr/bin/find /etc/iscsi) + + # Detect iBFT and perform mandatory steps + if [[ $hostonly_cmdline == "yes" ]] ; then +@@ -221,6 +234,8 @@ 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" +Index: dracut-044/modules.d/95iscsi/parse-iscsiroot.sh +=================================================================== +--- dracut-044.orig/modules.d/95iscsi/parse-iscsiroot.sh 2016-04-11 17:05:31.665079179 +0200 ++++ dracut-044/modules.d/95iscsi/parse-iscsiroot.sh 2016-04-11 17:40:48.076791382 +0200 +@@ -77,7 +77,7 @@ if [ -n "$iscsiroot" ] ; then + fi + + # iscsi_firmware does not need argument checking +-if [ -n "$iscsi_firmware" ]; then ++if [ -n "$iscsi_firmware" ] && iscsiadm -m fw; then + if [ "$root" != "dhcp" ] && [ "$netroot" != "dhcp" ]; then + [ -z "$netroot" ] && netroot=iscsi: + fi diff --git a/0191-static_network_setup_return_zero.patch b/0191-static_network_setup_return_zero.patch new file mode 100644 index 0000000..1e63215 --- /dev/null +++ b/0191-static_network_setup_return_zero.patch @@ -0,0 +1,40 @@ +From: Thomas Blume +Subject: Unset gateway variable if emtpy + +If the gateway variable is empty (ie '::' for IPv6 or '0.0.0.0' for IPv4) +it should be unset. + +References: bsc#919179 + +Signed-off-by: Thomas Blume + +Index: dracut-044/modules.d/40network/ifup.sh +=================================================================== +--- dracut-044.orig/modules.d/40network/ifup.sh 2016-04-11 17:41:48.628218989 +0200 ++++ dracut-044/modules.d/40network/ifup.sh 2016-04-11 17:43:45.250819391 +0200 +@@ -327,6 +327,7 @@ if strglobin $ip '*:*:*'; then + # note no ip addr flush for ipv6 + ip addr add $ip/$prefix ${srv:+peer $srv} dev $netif + wait_for_ipv6_dad $netif ++ [ "$gw" = "::" ] && gw="" + else + if ! arping -f -q -D -c 2 -I $netif $ip; then + warn "Duplicate address detected for $ip for interface $netif." +@@ -335,6 +336,7 @@ if strglobin $ip '*:*:*'; then + # Assume /24 prefix for IPv4 + [ -z "$prefix" ] && prefix=24 + ip addr add $ip/$prefix ${srv:+peer $srv} brd + dev $netif ++ [ "$gw" = "0.0.0.0" ] && gw="" + fi + + [ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw +@@ -352,6 +354,9 @@ if strglobin $ip '*:*:*'; then + done + + [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname ++ ++ [ $? -ne 0 ] && info "Static network setup returned $?" ++ return 0 + } + + # loopback is always handled the same way diff --git a/0192-iscsi_set_boot_protocol_from_ifcfg.patch b/0192-iscsi_set_boot_protocol_from_ifcfg.patch new file mode 100644 index 0000000..d03269d --- /dev/null +++ b/0192-iscsi_set_boot_protocol_from_ifcfg.patch @@ -0,0 +1,27 @@ +From: Thomas Blume +Subject: set boot protocol for iscsi from ifcfg file + +References: bsc#919179 + +Signed-off-by: Thomas Blume + +Index: dracut-044/modules.d/95iscsi/module-setup.sh +=================================================================== +--- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2016-04-11 17:44:53.046657012 +0200 ++++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-11 17:44:53.090659503 +0200 +@@ -104,7 +104,14 @@ install_iscsiroot() { + [ -z "$iscsi_address" ] && return + local_address=$(ip -o route get to $iscsi_address | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p') + ifname=$(ip -o route get to $iscsi_address | sed -n 's/.*dev \([^ ]*\).*/\1/p') +- printf 'ip=%s:static ' ${ifname} ++ ++ #follow ifcfg settings for boot protocol ++ bootproto=$(sed -n "/BOOTPROTO/s/BOOTPROTO='\([[:alpha:]]*6\?\)4\?'/\1/p" /etc/sysconfig/network/ifcfg-$ifname) ++ if [ $bootproto ]; then ++ printf 'ip=%s:%s ' ${ifname} ${bootproto} ++ else ++ printf 'ip=%s:static ' ${ifname} ++ fi + + if [ -e /sys/class/net/$ifname/address ] ; then + ifmac=$(cat /sys/class/net/$ifname/address) diff --git a/0193-95iscsi-Set-number-of-login-retries.patch b/0193-95iscsi-Set-number-of-login-retries.patch new file mode 100644 index 0000000..1413f65 --- /dev/null +++ b/0193-95iscsi-Set-number-of-login-retries.patch @@ -0,0 +1,89 @@ +From: Thomas Blume +Date: Mon, 19 Oct 2015 09:39:41 +0200 +Subject: Set number of login retries + +Allow to set the number of login retries from the kernel commandline. + +References: bsc#919179 + +Signed-off-by: Thomas Blume +--- + modules.d/95iscsi/iscsiroot.sh | 25 +++++++++++++++++++++---- + 1 file changed, 21 insertions(+), 4 deletions(-) + +Index: dracut-044/modules.d/95iscsi/iscsiroot.sh +=================================================================== +--- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2016-04-11 18:03:25.433613430 +0200 ++++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-11 18:09:16.269467779 +0200 +@@ -41,6 +41,14 @@ if [ -z "${DRACUT_SYSTEMD}" ] && [ -e /s + > /tmp/iscsiuio-started + fi + ++#set value for initial login retry ++set_login_retries() { ++ local default retries ++ default=2 ++ retries=$(getarg rd.iscsilogin.retries) ++ return ${retries:-$default} ++} ++ + handle_firmware() + { + if ! iscsiadm -m fw; then +@@ -48,11 +56,12 @@ handle_firmware() + return 1 + fi + ++ ### ToDo: Fix this for iscsiadm + for p in $(getargs rd.iscsi.param -d iscsi_param); do + iscsi_param="$iscsi_param --param $p" + done + +- if ! iscsiadm -m fw -l; then ++ if ! iscsiadm -m fw -l ; then + warn "iscsiadm: Log-in to iscsi target failed" + fi + +@@ -71,7 +80,7 @@ handle_netroot() + local iscsi_username iscsi_password + local iscsi_in_username iscsi_in_password + local iscsi_iface_name iscsi_netdev_name +- local iscsi_param ++ local iscsi_param param + local p + + # override conf settings by command line options +@@ -94,7 +103,7 @@ handle_netroot() + arg=$(getarg rd.iscsi.in.password -d iscsi_in_password=) + [ -n "$arg" ] && iscsi_in_password=$arg + for p in $(getargs rd.iscsi.param -d iscsi_param); do +- iscsi_param="$iscsi_param --param $p" ++ iscsi_param="$iscsi_param $p" + done + + parse_iscsi_root "$1" || return 1 +@@ -104,6 +113,15 @@ handle_netroot() + ip route get "$iscsi_target_ip" >/dev/null 2>&1 || return 0 + fi + ++ #limit iscsistart login retries ++ if [[ ! "$iscsi_param" =~ "node.session.initial_login_retry_max" ]]; then ++ set_login_retries ++ retries=$? ++ if [ $retries -gt 0 ]; then ++ iscsi_param="${iscsi_param% } node.session.initial_login_retry_max=$retries" ++ fi ++ fi ++ + # XXX is this needed? + getarg ro && iscsirw=ro + getarg rw && iscsirw=rw +@@ -206,7 +224,7 @@ handle_netroot() + [ -n "$iscsi_password" ] && $($COMMAND --name=node.session.auth.password --value=$iscsi_password) + [ -n "$iscsi_in_username" ] && $($COMMAND --name=node.session.auth.username_in --value=$iscsi_in_username) + [ -n "$iscsi_in_password" ] && $($COMMAND --name=node.session.auth.password_in --value=$iscsi_in_password) +- [ -n "$iscsi_param" ] && $($COMMAND --name=${iscsi_param%=*} --value=${iscsi_param#*=} ++ [ -n "$iscsi_param" ] && for param in $iscsi_param; do $($COMMAND --name=${param%=*} --value=${param#*=}); done + fi + done + diff --git a/0402-driver-fail-summary.patch b/0402-driver-fail-summary.patch index e644750..a6341d6 100644 --- a/0402-driver-fail-summary.patch +++ b/0402-driver-fail-summary.patch @@ -21,9 +21,9 @@ Signed-off-by: Fabian Vogt Index: dracut-044/dracut-init.sh =================================================================== ---- dracut-044.orig/dracut-init.sh -+++ dracut-044/dracut-init.sh -@@ -1077,14 +1077,16 @@ instmods() { +--- dracut-044.orig/dracut-init.sh 2016-04-11 18:19:59.333855978 +0200 ++++ dracut-044/dracut-init.sh 2016-04-11 18:19:59.585870239 +0200 +@@ -1084,14 +1084,16 @@ instmods() { [[ $no_kernel = yes ]] && return # called [sub]functions inherit _fderr local _fderr=9 @@ -41,7 +41,7 @@ Index: dracut-044/dracut-init.sh _silent=yes shift fi -@@ -1166,7 +1168,7 @@ instmods() { +@@ -1173,7 +1175,7 @@ instmods() { while read _mod || [ -n "$_mod" ]; do inst1mod "${_mod%.ko*}" || { if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then @@ -50,7 +50,7 @@ Index: dracut-044/dracut-init.sh fi } done -@@ -1174,7 +1176,7 @@ instmods() { +@@ -1181,7 +1183,7 @@ instmods() { while (($# > 0)); do # filenames as arguments inst1mod ${1%.ko*} || { if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then @@ -61,8 +61,8 @@ Index: dracut-044/dracut-init.sh shift Index: dracut-044/dracut.sh =================================================================== ---- dracut-044.orig/dracut.sh -+++ dracut-044/dracut.sh +--- dracut-044.orig/dracut.sh 2016-04-11 18:19:59.429861411 +0200 ++++ dracut-044/dracut.sh 2016-04-11 18:19:59.593870691 +0200 @@ -390,6 +390,12 @@ verbosity_mod_l=0 unset kernel unset outfile diff --git a/0403-95lunmask-Add-module-to-handle-LUN-masking.patch b/0403-95lunmask-Add-module-to-handle-LUN-masking.patch new file mode 100644 index 0000000..11a2f43 --- /dev/null +++ b/0403-95lunmask-Add-module-to-handle-LUN-masking.patch @@ -0,0 +1,205 @@ +From 1d427bcf3527ba96828a4bd5231409967ff096b4 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Wed, 11 Nov 2015 12:20:33 +0100 +Subject: [PATCH] 95lunmask: Add module to handle LUN masking + +Using the module option 'scsi_mod.scan=disabled' +this implements LUN masking by selectively enable only those +devices required for booting. + +References: bsc#954600,FATE#319786 + +Signed-off-by: Hannes Reinecke +--- + modules.d/95lunmask/fc_transport_scan_lun.sh | 26 ++++++++++ + modules.d/95lunmask/module-setup.sh | 70 +++++++++++++++++++++++++++ + modules.d/95lunmask/parse-lunmask.sh | 40 +++++++++++++++ + modules.d/95lunmask/sas_transport_scan_lun.sh | 26 ++++++++++ + 4 files changed, 162 insertions(+) + create mode 100755 modules.d/95lunmask/fc_transport_scan_lun.sh + create mode 100755 modules.d/95lunmask/module-setup.sh + create mode 100755 modules.d/95lunmask/parse-lunmask.sh + create mode 100755 modules.d/95lunmask/sas_transport_scan_lun.sh + +Index: dracut-044/modules.d/95lunmask/fc_transport_scan_lun.sh +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ dracut-044/modules.d/95lunmask/fc_transport_scan_lun.sh 2016-04-12 13:13:27.189597634 +0200 +@@ -0,0 +1,26 @@ ++#!/bin/bash ++# ++# fc_transport_lun_scan ++# ++# Selectively enable individual LUNs behind an FC remote port ++# ++# ACTION=="add", SUBSYSTEM=="fc_transport", ATTR{port_name}=="wwpn", \ ++# PROGRAM="fc_transport_lun_scan lun" ++# ++ ++[ -z $DEVPATH ] && exit 1 ++ ++if [ -n "$1" ] ; then ++ LUN=$1 ++else ++ LUN=- ++fi ++ID=${DEVPATH##*/rport-} ++HOST=${ID%%:*} ++CHANNEL=${ID%%-*} ++CHANNEL=${CHANNEL#*:} ++if [ -f /sys$DEVPATH/scsi_target_id ] ; then ++ TARGET=$(cat /sys$DEVPATH/scsi_target_id) ++fi ++[ -z "$TARGET" ] && exit 1 ++echo $CHANNEL $TARGET $LUN > /sys/class/scsi_host/host$HOST/scan +Index: dracut-044/modules.d/95lunmask/module-setup.sh +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ dracut-044/modules.d/95lunmask/module-setup.sh 2016-04-12 13:13:27.193597860 +0200 +@@ -0,0 +1,70 @@ ++#!/bin/bash ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++# called by dracut ++cmdline() { ++ get_lunmask() { ++ local _dev=$1 ++ local _devpath=$(cd -P /sys/dev/block/$_dev ; echo $PWD) ++ local _sdev _lun _rport _end_device _classdev _wwpn _sas_address ++ ++ [ "${_devpath#*/sd}" == "$_devpath" ] && return 1 ++ _sdev="${_devpath%%/block/*}" ++ _lun="${_sdev##*:}" ++ # Check for FibreChannel ++ _rport="${_devpath##*/rport-}" ++ if [ "$_rport" != "$_devpath" ] ; then ++ _rport="${_rport%%/*}" ++ _classdev="/sys/class/fc_remote_ports/rport-${_rport}" ++ [ -d "$_classdev" ] || return 1 ++ _wwpn=$(cat ${_classdev}/port_name) ++ echo "rd.lunmask=fc,${_wwpn},${_lun}" ++ return 0 ++ fi ++ # Check for SAS ++ _end_device="${_devpath##*/end_device-}" ++ if [ "$_end_device" != "$_devpath" ] ; then ++ _end_device="${_end_device%%/*}" ++ _classdev="/sys/class/sas_device/end_device-${_end_device}" ++ [ -e "$_classdev" ] || return 1 ++ _sas_address=$(cat ${_classdev}/sas_address) ++ echo "rd.lunmask=sas,${_sas_address},${_lun}" ++ return 0 ++ fi ++ return 1 ++ } ++ [[ $hostonly ]] || [[ $mount_needs ]] && { ++ for_each_host_dev_and_slaves_all get_lunmask ++ } | sort | uniq ++} ++ ++# called by dracut ++check() { ++ [[ $hostonly ]] || [[ $mount_needs ]] && { ++ [ -w /sys/module/scsi_mod/parameters/scan ] || return 255 ++ scan_type=$(cat /sys/module/scsi_mod/parameters/scan) ++ [ "$scan_type" = "disabled" ] && return 0 ++ return 255 ++ } ++ return 0 ++} ++ ++# called by dracut ++depends() { ++ return 0 ++} ++ ++# called by dracut ++install() { ++ inst_script "$moddir/fc_transport_scan_lun.sh" /usr/lib/udev/fc_transport_scan_lun.sh ++ inst_script "$moddir/sas_transport_scan_lun.sh" /usr/lib/udev/sas_transport_scan_lun.sh ++ inst_hook cmdline 30 "$moddir/parse-lunmask.sh" ++ if [[ $hostonly_cmdline == "yes" ]] ; then ++ local _lunmask ++ ++ for _lunmask in $(cmdline) ; do ++ printf "%s\n" "$_lunmask" >> "${initdir}/etc/cmdline.d/95lunmask.conf" ++ done ++ fi ++} +Index: dracut-044/modules.d/95lunmask/parse-lunmask.sh +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ dracut-044/modules.d/95lunmask/parse-lunmask.sh 2016-04-12 13:13:27.193597860 +0200 +@@ -0,0 +1,40 @@ ++#!/bin/sh ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++create_udev_rule() { ++ local transport=$1 ++ local tgtid=$2 ++ local lun=$3 ++ local _rule=/etc/udev/rules.d/51-${transport}-lunmask-${tgtid}.rules ++ local _cu_type _dev_type ++ ++ [ -e ${_rule} ] && return 0 ++ ++ if [ ! -f "$_rule" ] ; then ++ if [ "$transport" = "fc" ] ; then ++ cat > $_rule < $_rule < /sys/module/scsi_mod/parameters/scan ++ elif [ ! -f /etc/modprobe.d/95lunmask.conf ] ; then ++ echo "options scsi_mod scan=disabled" > /etc/modprobe.d/95lunmask.conf ++ fi ++ create_udev_rule $1 $2 $3 ++ ) ++done +Index: dracut-044/modules.d/95lunmask/sas_transport_scan_lun.sh +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ dracut-044/modules.d/95lunmask/sas_transport_scan_lun.sh 2016-04-12 13:13:27.193597860 +0200 +@@ -0,0 +1,26 @@ ++#!/bin/bash ++# ++# sas_transport_lun_scan ++# ++# Selectively enable individual LUNs behind a SAS end device ++# ++# ACTION=="add", SUBSYSTEM=="sas_transport", ATTR{sas_address}=="sas_addr", \ ++# PROGRAM="sas_transport_lun_scan lun" ++# ++ ++[ -z $DEVPATH ] && exit 1 ++ ++if [ -n "$1" ] ; then ++ LUN=$1 ++else ++ LUN=- ++fi ++ID=${DEVPATH##*/end_device-} ++HOST=${ID%%:*} ++CHANNEL=${ID%%-*} ++CHANNEL=${CHANNEL#*:} ++if [ -f /sys$DEVPATH/scsi_target_id ] ; then ++ TARGET=$(cat /sys$DEVPATH/scsi_target_id) ++fi ++[ -z "$TARGET" ] && exit 1 ++echo 0 $TARGET $LUN > /sys/class/scsi_host/host$HOST/scan diff --git a/dracut.changes b/dracut.changes index fee8351..b5bc3e4 100644 --- a/dracut.changes +++ b/dracut.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Tue Apr 12 14:05:55 UTC 2016 - trenn@suse.de + +- Forward port of latest SLES patches (fate#320499) +Add: + * 0170-iscsi-skip-ibft-invalid-dhcp.patch + * 0160-s390-update_active_devices_initrd.patch + * 0161-95zfcp_rules-simplified-rd.zfcp-commandline-for-NPIV.patch + * 0190-replace-iscsistart-with-systemd-service-files.patch + * 0191-static_network_setup_return_zero.patch + * 0192-iscsi_set_boot_protocol_from_ifcfg.patch + * 0193-95iscsi-Set-number-of-login-retries.patch + * 0403-95lunmask-Add-module-to-handle-LUN-masking.patch + ------------------------------------------------------------------- Wed Mar 30 22:27:06 UTC 2016 - dmueller@suse.com diff --git a/dracut.spec b/dracut.spec index 16f9ca4..3572d7f 100644 --- a/dracut.spec +++ b/dracut.spec @@ -1,7 +1,7 @@ # # spec file for package dracut # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -53,6 +53,7 @@ Patch145: 0145-40network-handle-ip-ifname-static-correctly.patch Patch159: 0159-network-Try-to-load-xennet.patch Patch162: 0162-network-Request-DHCP-lease-instead-of-getting-applyi.patch Patch169: 0169-network_set_mtu_macaddr_for_dhcp.patch +Patch170: 0170-iscsi-skip-ibft-invalid-dhcp.patch #S390 Patch16: 0016-Add-new-s390x-specific-rule-files.patch @@ -74,11 +75,13 @@ Patch109: 0109-95dasd_rules-Store-all-devices-in-commandline.patch Patch110: 0110-95zfcp_rules-Store-all-devices-in-commandline.patch Patch113: 0113-91zipl-Install-script-as-executable.patch Patch114: 0114-91zipl-Translate-ext2-3-into-ext4.patch +Patch116: 0116-Mark-scripts-as-executable.patch Patch117: 0117-95dasd_rules-Enable-the-device-before-checking-devic.patch Patch118: 0118-95zfcp_rules-Enable-the-device-before-checking-devic.patch Patch123: 0123-95zfcp_rules-fix-typo-in-module_setup.patch Patch157: 0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch -Patch116: 0116-Mark-scripts-as-executable.patch +Patch160: 0160-s390-update_active_devices_initrd.patch +Patch161: 0161-95zfcp_rules-simplified-rd.zfcp-commandline-for-NPIV.patch #FIPS Patch53: 0053-01fips-fixup-loading-issues.patch @@ -105,6 +108,16 @@ Patch180: 0180-i18n_add_correct_fontmaps.patch Patch182: 0182-fix-include-parsing.patch Patch183: 0183-fix_add_drivers_hang.patch +# iscsiadm +Patch190: 0190-replace-iscsistart-with-systemd-service-files.patch +Patch191: 0191-static_network_setup_return_zero.patch +Patch192: 0192-iscsi_set_boot_protocol_from_ifcfg.patch +Patch193: 0193-95iscsi-Set-number-of-login-retries.patch +# ToDo for author (hare/tsaupe): Fix up and adjust to mainline code +#Patch194: 0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch +#Patch195: 0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch +#Patch196: 0196-ibft-wait-for-session-on-all-paths.patch + # Submit mainline asap Patch128: 0128-90lvm-Install-dm-snapshot-module.patch Patch200: 0200-dracut_fix_multipath_without_config.patch @@ -120,12 +133,13 @@ Patch209: 0209-fix_modules_load_d_hostonly.patch Patch210: 0210-add_fcoe_uefi_check.patch Patch211: 0211-fix_multipath_check_hostonly.patch -## SUSE-specific fixes +# SUSE-specific fixes Patch300: 0300-dracut_dont_use_dpkg_defaults_on_SUSE.patch Patch301: 0301-include_sysconfig_language.patch # New features/improvements Patch402: 0402-driver-fail-summary.patch +Patch403: 0403-95lunmask-Add-module-to-handle-LUN-masking.patch BuildRequires: asciidoc BuildRequires: bash @@ -249,18 +263,27 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh %patch157 -p1 %patch158 -p1 %patch159 -p1 +%patch160 -p1 +%patch161 -p1 %patch162 -p1 %patch163 -p1 %patch164 -p1 %patch168 -p1 %patch169 -p1 +%patch170 -p1 %patch180 -p1 -# disabled, as it breaks encrypted / on LVM - dimstar, 20151001 -#patch181 -p1 %patch182 -p1 %patch183 -p1 +%patch190 -p1 +%patch191 -p1 +%patch192 -p1 +%patch193 -p1 +#%patch194 -p1 +#%patch195 -p1 +#%patch196 -p1 + %patch200 -p1 %patch201 -p1 %patch202 -p1 @@ -278,6 +301,7 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh %patch301 -p1 %patch402 -p1 +%patch403 -p1 %build %configure\ @@ -487,6 +511,7 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra %{dracutlibdir}/modules.d/95dasd_mod %{dracutlibdir}/modules.d/95dasd_rules %{dracutlibdir}/modules.d/95fstab-sys +%{dracutlibdir}/modules.d/95lunmask %{dracutlibdir}/modules.d/95zfcp %{dracutlibdir}/modules.d/95zfcp_rules %{dracutlibdir}/modules.d/95terminfo @@ -515,6 +540,11 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra %attr(0755,root,root) %{dracutlibdir}/modules.d/99suse/parse-suse-initrd.sh %attr(0755,root,root) %{dracutlibdir}/modules.d/99suse/module-setup.sh +%attr(0755,root,root) %{dracutlibdir}/modules.d/95lunmask/sas_transport_scan_lun.sh +%attr(0755,root,root) %{dracutlibdir}/modules.d/95lunmask/parse-lunmask.sh +%attr(0755,root,root) %{dracutlibdir}/modules.d/95lunmask/fc_transport_scan_lun.sh +%attr(0755,root,root) %{dracutlibdir}/modules.d/95lunmask/module-setup.sh + %config(noreplace) %{_sysconfdir}/logrotate.d/dracut %attr(0640,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log %dir %{_unitdir}/initrd.target.wants From 68290a9ec921de0beea9ddb9bd2e8cc34af1b5e75027ebd2efaca45252651b12 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Thu, 14 Apr 2016 13:36:44 +0000 Subject: [PATCH 2/3] Fix merge conflicts silently OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=257 --- ...scsistart-with-systemd-service-files.patch | 35 ++-- 0192-iscsi_set_boot_protocol_from_ifcfg.patch | 4 +- ...-95iscsi-Set-number-of-login-retries.patch | 33 +--- ...equire-network-for-qla4xxx-flash-ses.patch | 135 ++++++++++++++ ....iscsi.firmware-for-qla4xxx-sessions.patch | 168 ++++++++++++++++++ 0196-ibft-wait-for-session-on-all-paths.patch | 32 ++++ 0203-no-fail-builtin-module.patch | 6 +- dracut.changes | 4 +- dracut.spec | 5 +- 9 files changed, 373 insertions(+), 49 deletions(-) create mode 100644 0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch create mode 100644 0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch create mode 100644 0196-ibft-wait-for-session-on-all-paths.patch diff --git a/0190-replace-iscsistart-with-systemd-service-files.patch b/0190-replace-iscsistart-with-systemd-service-files.patch index 2390496..1e0372b 100644 --- a/0190-replace-iscsistart-with-systemd-service-files.patch +++ b/0190-replace-iscsistart-with-systemd-service-files.patch @@ -18,9 +18,9 @@ Signed-off-by: Thomas Blume Index: dracut-044/modules.d/95iscsi/iscsiroot.sh =================================================================== ---- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2016-04-11 17:05:18.348326173 +0200 -+++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-11 17:38:05.939615885 +0200 -@@ -43,8 +43,8 @@ fi +--- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2015-11-25 14:22:28.000000000 +0100 ++++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-14 14:52:44.685325362 +0200 +@@ -43,17 +43,13 @@ fi handle_firmware() { @@ -31,10 +31,10 @@ Index: dracut-044/modules.d/95iscsi/iscsiroot.sh return 1 fi -@@ -52,8 +52,8 @@ handle_firmware() - iscsi_param="$iscsi_param --param $p" - done - +- for p in $(getargs rd.iscsi.param -d iscsi_param); do +- iscsi_param="$iscsi_param --param $p" +- done +- - if ! iscsistart -b $iscsi_param; then - warn "'iscsistart -b $iscsi_param' failed with return code $?" + if ! iscsiadm -m fw -l; then @@ -42,7 +42,7 @@ Index: dracut-044/modules.d/95iscsi/iscsiroot.sh fi echo 'started' > "/tmp/iscsistarted-iscsi:" -@@ -77,7 +77,7 @@ handle_netroot() +@@ -77,7 +73,7 @@ handle_netroot() # override conf settings by command line options arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) [ -n "$arg" ] && iscsi_initiator=$arg @@ -51,7 +51,16 @@ Index: dracut-044/modules.d/95iscsi/iscsiroot.sh [ -n "$arg" ] && iscsi_target_name=$arg arg=$(getarg rd.iscsi.target.ip -d iscsi_target_ip) [ -n "$arg" ] && iscsi_target_ip=$arg -@@ -182,45 +182,37 @@ handle_netroot() +@@ -94,7 +90,7 @@ handle_netroot() + arg=$(getarg rd.iscsi.in.password -d iscsi_in_password=) + [ -n "$arg" ] && iscsi_in_password=$arg + for p in $(getargs rd.iscsi.param -d iscsi_param); do +- iscsi_param="$iscsi_param --param $p" ++ iscsi_param="$iscsi_param $p" + done + + parse_iscsi_root "$1" || return 1 +@@ -182,45 +178,37 @@ handle_netroot() echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh fi @@ -127,8 +136,8 @@ Index: dracut-044/modules.d/95iscsi/iscsiroot.sh return 0 Index: dracut-044/modules.d/95iscsi/module-setup.sh =================================================================== ---- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2016-04-11 17:05:18.352326398 +0200 -+++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-11 17:05:31.661078953 +0200 +--- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2015-11-25 14:22:28.000000000 +0100 ++++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-14 14:12:39.693392427 +0200 @@ -4,7 +4,7 @@ check() { local _rootdev @@ -173,8 +182,8 @@ Index: dracut-044/modules.d/95iscsi/module-setup.sh inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" Index: dracut-044/modules.d/95iscsi/parse-iscsiroot.sh =================================================================== ---- dracut-044.orig/modules.d/95iscsi/parse-iscsiroot.sh 2016-04-11 17:05:31.665079179 +0200 -+++ dracut-044/modules.d/95iscsi/parse-iscsiroot.sh 2016-04-11 17:40:48.076791382 +0200 +--- dracut-044.orig/modules.d/95iscsi/parse-iscsiroot.sh 2015-11-25 14:22:28.000000000 +0100 ++++ dracut-044/modules.d/95iscsi/parse-iscsiroot.sh 2016-04-14 14:12:39.693392427 +0200 @@ -77,7 +77,7 @@ if [ -n "$iscsiroot" ] ; then fi diff --git a/0192-iscsi_set_boot_protocol_from_ifcfg.patch b/0192-iscsi_set_boot_protocol_from_ifcfg.patch index d03269d..85e97cf 100644 --- a/0192-iscsi_set_boot_protocol_from_ifcfg.patch +++ b/0192-iscsi_set_boot_protocol_from_ifcfg.patch @@ -7,8 +7,8 @@ Signed-off-by: Thomas Blume Index: dracut-044/modules.d/95iscsi/module-setup.sh =================================================================== ---- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2016-04-11 17:44:53.046657012 +0200 -+++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-11 17:44:53.090659503 +0200 +--- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2016-04-14 14:12:39.693392427 +0200 ++++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-14 14:53:00.630227712 +0200 @@ -104,7 +104,14 @@ install_iscsiroot() { [ -z "$iscsi_address" ] && return local_address=$(ip -o route get to $iscsi_address | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p') diff --git a/0193-95iscsi-Set-number-of-login-retries.patch b/0193-95iscsi-Set-number-of-login-retries.patch index 1413f65..7d93261 100644 --- a/0193-95iscsi-Set-number-of-login-retries.patch +++ b/0193-95iscsi-Set-number-of-login-retries.patch @@ -13,8 +13,8 @@ Signed-off-by: Thomas Blume Index: dracut-044/modules.d/95iscsi/iscsiroot.sh =================================================================== ---- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2016-04-11 18:03:25.433613430 +0200 -+++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-11 18:09:16.269467779 +0200 +--- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2016-04-14 14:52:44.685325362 +0200 ++++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-14 14:57:07.628188324 +0200 @@ -41,6 +41,14 @@ if [ -z "${DRACUT_SYSTEMD}" ] && [ -e /s > /tmp/iscsiuio-started fi @@ -30,21 +30,7 @@ Index: dracut-044/modules.d/95iscsi/iscsiroot.sh handle_firmware() { if ! iscsiadm -m fw; then -@@ -48,11 +56,12 @@ handle_firmware() - return 1 - fi - -+ ### ToDo: Fix this for iscsiadm - for p in $(getargs rd.iscsi.param -d iscsi_param); do - iscsi_param="$iscsi_param --param $p" - done - -- if ! iscsiadm -m fw -l; then -+ if ! iscsiadm -m fw -l ; then - warn "iscsiadm: Log-in to iscsi target failed" - fi - -@@ -71,7 +80,7 @@ handle_netroot() +@@ -67,7 +75,7 @@ handle_netroot() local iscsi_username iscsi_password local iscsi_in_username iscsi_in_password local iscsi_iface_name iscsi_netdev_name @@ -53,16 +39,7 @@ Index: dracut-044/modules.d/95iscsi/iscsiroot.sh local p # override conf settings by command line options -@@ -94,7 +103,7 @@ handle_netroot() - arg=$(getarg rd.iscsi.in.password -d iscsi_in_password=) - [ -n "$arg" ] && iscsi_in_password=$arg - for p in $(getargs rd.iscsi.param -d iscsi_param); do -- iscsi_param="$iscsi_param --param $p" -+ iscsi_param="$iscsi_param $p" - done - - parse_iscsi_root "$1" || return 1 -@@ -104,6 +113,15 @@ handle_netroot() +@@ -100,6 +108,15 @@ handle_netroot() ip route get "$iscsi_target_ip" >/dev/null 2>&1 || return 0 fi @@ -78,7 +55,7 @@ Index: dracut-044/modules.d/95iscsi/iscsiroot.sh # XXX is this needed? getarg ro && iscsirw=ro getarg rw && iscsirw=rw -@@ -206,7 +224,7 @@ handle_netroot() +@@ -202,7 +219,7 @@ handle_netroot() [ -n "$iscsi_password" ] && $($COMMAND --name=node.session.auth.password --value=$iscsi_password) [ -n "$iscsi_in_username" ] && $($COMMAND --name=node.session.auth.username_in --value=$iscsi_in_username) [ -n "$iscsi_in_password" ] && $($COMMAND --name=node.session.auth.password_in --value=$iscsi_in_password) diff --git a/0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch b/0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch new file mode 100644 index 0000000..67dfa15 --- /dev/null +++ b/0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch @@ -0,0 +1,135 @@ +From: Hannes Reinecke +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 +--- + 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 53179d1..276d1ce 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -45,7 +45,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*} +@@ -56,6 +56,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 +@@ -110,6 +123,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 + } +@@ -244,8 +258,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" +-- +1.8.4.5 + +From: Hannes Reinecke +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 +--- + modules.d/95iscsi/module-setup.sh | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +Index: dracut-044/modules.d/95iscsi/module-setup.sh +=================================================================== +--- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2016-04-11 18:03:25.493616825 +0200 ++++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-11 18:03:25.613623617 +0200 +@@ -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" diff --git a/0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch b/0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch new file mode 100644 index 0000000..e848088 --- /dev/null +++ b/0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch @@ -0,0 +1,168 @@ +From: Hannes Reinecke +Date: Tue, 20 Oct 2015 07:59:43 +0200 +Subject: 95iscsi: set 'rd.iscsi.firmware' for qla4xxx sessions + +The qla4xxx driver can run with or without open-iscsi support, +depending on the setting of the 'ql4xdisablesysfsboot' module +parameter. +When the parameter is set to '0', dracut needs to call +'iscsiadm -m fw' to trigger iSCSI login, so we need to set +the 'rd.iscsi.firmware' dracut variable. But this will then +fail if the parameter is set to '1', as in these cases the +list of firmware targets is empty. +To cover both scenarios this patch reshuffles 'handle_firmware' +in iscsiroot.sh to continue if iscsiadm -m fw fails but iscsi +sessions are present. + +References: bsc#951003 + +Signed-off-by: Hannes Reinecke +--- + modules.d/95iscsi/iscsiroot.sh | 23 ++++++++++++++--------- + modules.d/95iscsi/module-setup.sh | 1 + + 2 files changed, 15 insertions(+), 9 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 38aff41..1e6ab41 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -54,17 +54,24 @@ set_login_retries() { + handle_firmware() + { + if ! [ -e /tmp/iscsistarted-firmware ]; then ++ # Depending on the 'ql4xdisablesysfsboot' qla4xxx ++ # will be autostarting sessions without presenting ++ # them via the firmware interface. ++ # In these cases 'iscsiadm -m fw' will fail, but ++ # the iSCSI sessions will still be present. + if ! iscsiadm -m fw; then + warn "iscsiadm: Could not get list of targets from firmware." +- return 1 +- fi ++ else + +- for p in $(getargs rd.iscsi.param -d iscsi_param); do +- iscsi_param="$iscsi_param --param $p" +- done ++ for p in $(getargs rd.iscsi.param -d iscsi_param); do ++ iscsi_param="$iscsi_param --param $p" ++ done + +- if ! iscsiadm -m fw -l; then +- warn "iscsiadm: Log-in to iscsi target failed" ++ if ! iscsiadm -m fw -l; then ++ warn "iscsiadm: Log-in to iscsi target failed" ++ else ++ need_shutdown ++ fi + fi + + if [ -d /sys/class/iscsi_session ]; then +@@ -73,8 +80,6 @@ handle_firmware() + else + return 1 + fi +- +- need_shutdown + fi + return 0 + } +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 276d1ce..e29f342 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -66,6 +66,7 @@ install_iscsiroot() { + # qla4xxx flashnode session; skip iBFT discovery + iscsi_initiator=$(cat /sys/class/iscsi_host/${iscsi_host}/initiatorname) + echo "rd.iscsi.initiator=${iscsi_initiator}" ++ echo "rd.iscsi.firmware=1" + return; + fi + done +-- +1.8.4.5 + +From: Hannes Reinecke +Date: Tue, 20 Oct 2015 07:59:43 +0200 +Subject: 95iscsi: set 'rd.iscsi.firmware' for qla4xxx sessions + +The qla4xxx driver can run with or without open-iscsi support, +depending on the setting of the 'ql4xdisablesysfsboot' module +parameter. +When the parameter is set to '0', dracut needs to call +'iscsiadm -m fw' to trigger iSCSI login, so we need to set +the 'rd.iscsi.firmware' dracut variable. But this will then +fail if the parameter is set to '1', as in these cases the +list of firmware targets is empty. +To cover both scenarios this patch reshuffles 'handle_firmware' +in iscsiroot.sh to continue if iscsiadm -m fw fails but iscsi +sessions are present. + +References: bsc#951003 + +Signed-off-by: Hannes Reinecke +--- + modules.d/95iscsi/iscsiroot.sh | 23 ++++++++++++++--------- + modules.d/95iscsi/module-setup.sh | 1 + + 2 files changed, 15 insertions(+), 9 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 38aff41..1e6ab41 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -54,17 +54,24 @@ set_login_retries() { + handle_firmware() + { + if ! [ -e /tmp/iscsistarted-firmware ]; then ++ # Depending on the 'ql4xdisablesysfsboot' qla4xxx ++ # will be autostarting sessions without presenting ++ # them via the firmware interface. ++ # In these cases 'iscsiadm -m fw' will fail, but ++ # the iSCSI sessions will still be present. + if ! iscsiadm -m fw; then + warn "iscsiadm: Could not get list of targets from firmware." +- return 1 +- fi ++ else + +- for p in $(getargs rd.iscsi.param -d iscsi_param); do +- iscsi_param="$iscsi_param --param $p" +- done ++ for p in $(getargs rd.iscsi.param -d iscsi_param); do ++ iscsi_param="$iscsi_param --param $p" ++ done + +- if ! iscsiadm -m fw -l; then +- warn "iscsiadm: Log-in to iscsi target failed" ++ if ! iscsiadm -m fw -l; then ++ warn "iscsiadm: Log-in to iscsi target failed" ++ else ++ need_shutdown ++ fi + fi + + if [ -d /sys/class/iscsi_session ]; then +@@ -73,8 +80,6 @@ handle_firmware() + else + return 1 + fi +- +- need_shutdown + fi + return 0 + } +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 276d1ce..e29f342 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -66,6 +66,7 @@ install_iscsiroot() { + # qla4xxx flashnode session; skip iBFT discovery + iscsi_initiator=$(cat /sys/class/iscsi_host/${iscsi_host}/initiatorname) + echo "rd.iscsi.initiator=${iscsi_initiator}" ++ echo "rd.iscsi.firmware=1" + return; + fi + done +-- +1.8.4.5 + diff --git a/0196-ibft-wait-for-session-on-all-paths.patch b/0196-ibft-wait-for-session-on-all-paths.patch new file mode 100644 index 0000000..0ac9c6a --- /dev/null +++ b/0196-ibft-wait-for-session-on-all-paths.patch @@ -0,0 +1,32 @@ +Index: dracut-037/modules.d/95iscsi/iscsiroot.sh +=================================================================== +--- dracut-037.orig/modules.d/95iscsi/iscsiroot.sh ++++ dracut-037/modules.d/95iscsi/iscsiroot.sh +@@ -54,6 +54,8 @@ set_login_retries() { + handle_firmware() + { + if ! [ -e /tmp/iscsistarted-firmware ]; then ++ local ifaces retry ++ + # Depending on the 'ql4xdisablesysfsboot' qla4xxx + # will be autostarting sessions without presenting + # them via the firmware interface. +@@ -62,10 +64,15 @@ handle_firmware() + if ! iscsiadm -m fw; then + warn "iscsiadm: Could not get list of targets from firmware." + else ++ ifaces=( $(echo /sys/firmware/ibft/ethernet*) ) ++ [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry ++ retry=$(cat /tmp/session-retry) + +- for p in $(getargs rd.iscsi.param -d iscsi_param); do +- iscsi_param="$iscsi_param --param $p" +- done ++ if [ $retry -lt ${#ifaces[*]} ]; then ++ let retry++ ++ echo $retry > /tmp/session-retry ++ return 1 ++ fi + + if ! iscsiadm -m fw -l; then + warn "iscsiadm: Log-in to iscsi target failed" diff --git a/0203-no-fail-builtin-module.patch b/0203-no-fail-builtin-module.patch index 016984d..a5564cf 100644 --- a/0203-no-fail-builtin-module.patch +++ b/0203-no-fail-builtin-module.patch @@ -12,9 +12,9 @@ Signed-off-by: Fabian Vogt Index: dracut-044/dracut-init.sh =================================================================== ---- dracut-044.orig/dracut-init.sh -+++ dracut-044/dracut-init.sh -@@ -1122,6 +1122,11 @@ instmods() { +--- dracut-044.orig/dracut-init.sh 2016-04-14 14:12:39.421377052 +0200 ++++ dracut-044/dracut-init.sh 2016-04-14 14:58:46.285764636 +0200 +@@ -1129,6 +1129,11 @@ instmods() { return 0 fi diff --git a/dracut.changes b/dracut.changes index b5bc3e4..ef1dfc1 100644 --- a/dracut.changes +++ b/dracut.changes @@ -10,8 +10,10 @@ Add: * 0191-static_network_setup_return_zero.patch * 0192-iscsi_set_boot_protocol_from_ifcfg.patch * 0193-95iscsi-Set-number-of-login-retries.patch + * 0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch + * 0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch + * 0196-ibft-wait-for-session-on-all-paths.patch * 0403-95lunmask-Add-module-to-handle-LUN-masking.patch - ------------------------------------------------------------------- Wed Mar 30 22:27:06 UTC 2016 - dmueller@suse.com diff --git a/dracut.spec b/dracut.spec index 3572d7f..9ddfc30 100644 --- a/dracut.spec +++ b/dracut.spec @@ -116,7 +116,7 @@ Patch193: 0193-95iscsi-Set-number-of-login-retries.patch # ToDo for author (hare/tsaupe): Fix up and adjust to mainline code #Patch194: 0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch #Patch195: 0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch -#Patch196: 0196-ibft-wait-for-session-on-all-paths.patch +Patch196: 0196-ibft-wait-for-session-on-all-paths.patch # Submit mainline asap Patch128: 0128-90lvm-Install-dm-snapshot-module.patch @@ -282,7 +282,7 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh %patch193 -p1 #%patch194 -p1 #%patch195 -p1 -#%patch196 -p1 +%patch196 -p1 %patch200 -p1 %patch201 -p1 @@ -400,6 +400,7 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra %{dracutlibdir}/modules.d/02fips-aesni %files tools +%defattr(-,root,root,0755) %{_bindir}/dracut-catimages %{_mandir}/man8/dracut-catimages.8* %dir /boot/dracut From 2e0abbdaf29162a1659af1b4aedc2d7031566bf3b292875f94171ff88565a431 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Tue, 7 Jun 2016 13:51:45 +0000 Subject: [PATCH 3/3] 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 --- ...e-dhclient-with-wickedd-dhcp-supplic.patch | 49 ++--- ...-45ifcfg-use-distro-specific-scripts.patch | 53 +++--- ...ace-condition-when-wait-for-networks.patch | 17 +- ...nable-network-interfaces-if-explicit.patch | 18 +- ...g-Add-SUSE-specific-write-ifcfg-file.patch | 16 +- ...up-error-message-in-write-ifcfg-suse.patch | 13 +- ...work-always-start-netroot-in-ifup.sh.patch | 17 +- ...ork-create-var-lib-wicked-in-ifup.sh.patch | 13 +- ...s-Install-collect-udev-helper-binary.patch | 25 +++ ...scsistart-with-systemd-service-files.patch | 21 +-- ...equire-network-for-qla4xxx-flash-ses.patch | 135 -------------- ....iscsi.firmware-for-qla4xxx-sessions.patch | 168 ------------------ 0196-ibft-wait-for-session-on-all-paths.patch | 50 +++--- ...equire-network-for-qla4xxx-flash-ses.patch | 70 ++++++++ ....iscsi.firmware-for-qla4xxx-sessions.patch | 82 +++++++++ 0211-fix_multipath_check_hostonly.patch | 10 +- 0212-fcoe_reorder_init_path.patch | 44 +++++ ...th-add-hostonly-multipath.conf-in-ca.patch | 88 +++++++++ ...ask-Add-module-to-handle-LUN-masking.patch | 59 +++--- 0500-Reset-IFS-variable.patch | 99 +++++++++++ dracut.changes | 62 ++++++- dracut.spec | 29 ++- 22 files changed, 658 insertions(+), 480 deletions(-) create mode 100644 0188-95dasd_rules-Install-collect-udev-helper-binary.patch delete mode 100644 0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch delete mode 100644 0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch create mode 100644 0197-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch create mode 100644 0198-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch create mode 100644 0212-fcoe_reorder_init_path.patch create mode 100644 0302-Revert-90multipath-add-hostonly-multipath.conf-in-ca.patch create mode 100644 0500-Reset-IFS-variable.patch diff --git a/0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch b/0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch index f7f8ed1..33861f8 100644 --- a/0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch +++ b/0015-40network-replace-dhclient-with-wickedd-dhcp-supplic.patch @@ -1,7 +1,7 @@ -From 0aa152e662d2197f92617da4ab813fcd9be6f90f Mon Sep 17 00:00:00 2001 +From 3b7df07e27efd2ef2df4d9d40253ee8185eb4152 Mon Sep 17 00:00:00 2001 From: Pavel Wieczorkiewicz Date: Mon, 7 Apr 2014 16:26:57 +0200 -Subject: [PATCH] 40network: replace dhclient with wickedd-dhcp-supplicant +Subject: 40network: replace dhclient with wickedd-dhcp-supplicant SLES12 is using wickedd, so we need to replace dhclient with wickedd-dhcp-supplicant. @@ -10,28 +10,27 @@ References: bnc#866771 Signed-off-by: Hannes Reinecke --- - modules.d/40network/dhclient-script.sh | 156 --------------------------------- - modules.d/40network/dhclient.conf | 3 - - modules.d/40network/ifup.sh | 97 ++++++++++++++++++-- - modules.d/40network/kill-dhclient.sh | 17 ---- - modules.d/40network/module-setup.sh | 14 +-- - 5 files changed, 99 insertions(+), 188 deletions(-) - delete mode 100755 modules.d/40network/dhclient-script.sh + modules.d/40network/dhclient.conf | 3 - + modules.d/40network/ifup.sh | 109 ++++++++++++++++++++++++++++------- + modules.d/40network/kill-dhclient.sh | 15 ----- + modules.d/40network/module-setup.sh | 15 +++-- + 4 files changed, 98 insertions(+), 44 deletions(-) delete mode 100644 modules.d/40network/dhclient.conf delete mode 100755 modules.d/40network/kill-dhclient.sh -Index: dracut-044/modules.d/40network/dhclient.conf -=================================================================== ---- dracut-044.orig/modules.d/40network/dhclient.conf +diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf +deleted file mode 100644 +index dbf5882..0000000 +--- a/modules.d/40network/dhclient.conf +++ /dev/null @@ -1,3 +0,0 @@ -request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, domain-search, host-name, - root-path, interface-mtu; -Index: dracut-044/modules.d/40network/ifup.sh -=================================================================== ---- dracut-044.orig/modules.d/40network/ifup.sh -+++ dracut-044/modules.d/40network/ifup.sh +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 31a04bf..92e4b38 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh @@ -87,6 +87,70 @@ else [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0 fi @@ -166,9 +165,10 @@ Index: dracut-044/modules.d/40network/ifup.sh if [ -e /tmp/bridge.info ]; then . /tmp/bridge.info # start bridge if necessary -Index: dracut-044/modules.d/40network/kill-dhclient.sh -=================================================================== ---- dracut-044.orig/modules.d/40network/kill-dhclient.sh +diff --git a/modules.d/40network/kill-dhclient.sh b/modules.d/40network/kill-dhclient.sh +deleted file mode 100755 +index 9a17495..0000000 +--- a/modules.d/40network/kill-dhclient.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh @@ -186,10 +186,10 @@ Index: dracut-044/modules.d/40network/kill-dhclient.sh - read PID < $f; - kill -9 $PID >/dev/null 2>&1 -done -Index: dracut-044/modules.d/40network/module-setup.sh -=================================================================== ---- dracut-044.orig/modules.d/40network/module-setup.sh -+++ dracut-044/modules.d/40network/module-setup.sh +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 4bf93cc..2252995 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh @@ -1,10 +1,13 @@ #!/bin/bash @@ -236,3 +236,6 @@ Index: dracut-044/modules.d/40network/module-setup.sh _arch=$(uname -m) +-- +2.6.6 + diff --git a/0017-45ifcfg-use-distro-specific-scripts.patch b/0017-45ifcfg-use-distro-specific-scripts.patch index 00d92cf..7ffa2b3 100644 --- a/0017-45ifcfg-use-distro-specific-scripts.patch +++ b/0017-45ifcfg-use-distro-specific-scripts.patch @@ -1,7 +1,7 @@ -From 2bddf461e38b952a79e31650ba828a7ee506cbe9 Mon Sep 17 00:00:00 2001 +From afc08d7bbee93db0b81d20aef00f538fde3209e3 Mon Sep 17 00:00:00 2001 From: Pawel Wieczorkiewicz Date: Tue, 8 Apr 2014 08:48:27 +0200 -Subject: [PATCH] 45ifcfg: use distro-specific scripts +Subject: 45ifcfg: use distro-specific scripts Detect the system flavor and write the ifcfg files accordingly. @@ -16,15 +16,15 @@ Signed-off-by: Hannes Reinecke Modified-by: Thomas Rennigner Modified-by: Fabian Vogt --- - modules.d/40network/ifup.sh | 1 + - modules.d/40network/module-setup.sh | 7 +++++++ - modules.d/45ifcfg/module-setup.sh | 1 - + modules.d/40network/ifup.sh | 1 + + modules.d/40network/module-setup.sh | 7 +++++++ + modules.d/45ifcfg/module-setup.sh | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) -Index: dracut-044/modules.d/40network/ifup.sh -=================================================================== ---- dracut-044.orig/modules.d/40network/ifup.sh -+++ dracut-044/modules.d/40network/ifup.sh +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 92e4b38..347c7f7 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh @@ -189,6 +189,7 @@ do_dhcp() { $dhclient --test $netif > /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} dhcp_apply $1 || return $? @@ -33,22 +33,10 @@ Index: dracut-044/modules.d/40network/ifup.sh echo $netif > /tmp/setup_net_${netif}.ok return 0 } -Index: dracut-044/modules.d/45ifcfg/module-setup.sh -=================================================================== ---- dracut-044.orig/modules.d/45ifcfg/module-setup.sh -+++ dracut-044/modules.d/45ifcfg/module-setup.sh -@@ -2,7 +2,6 @@ - - # called by dracut - check() { -- [[ -d /etc/sysconfig/network-scripts ]] && return 0 - return 255 - } - -Index: dracut-044/modules.d/40network/module-setup.sh -=================================================================== ---- dracut-044.orig/modules.d/40network/module-setup.sh -+++ dracut-044/modules.d/40network/module-setup.sh +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 2252995..fa6c7fc 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh @@ -15,6 +15,13 @@ check() { # called by dracut depends() { @@ -63,3 +51,18 @@ Index: dracut-044/modules.d/40network/module-setup.sh return 0 } +diff --git a/modules.d/45ifcfg/module-setup.sh b/modules.d/45ifcfg/module-setup.sh +index 6791985..60ed92b 100755 +--- a/modules.d/45ifcfg/module-setup.sh ++++ b/modules.d/45ifcfg/module-setup.sh +@@ -2,7 +2,6 @@ + + # called by dracut + check() { +- [[ -d /etc/sysconfig/network-scripts ]] && return 0 + return 255 + } + +-- +2.6.6 + diff --git a/0019-40network-Fix-race-condition-when-wait-for-networks.patch b/0019-40network-Fix-race-condition-when-wait-for-networks.patch index 0fd6482..8200967 100644 --- a/0019-40network-Fix-race-condition-when-wait-for-networks.patch +++ b/0019-40network-Fix-race-condition-when-wait-for-networks.patch @@ -1,7 +1,7 @@ -From 330bb44b7773c7b861a6aaa32d4524c783a162f0 Mon Sep 17 00:00:00 2001 +From e4a8408698ea1a4d77b1c6d9ba76a7eab93b024a Mon Sep 17 00:00:00 2001 From: Pawel Wieczorkiewicz Date: Tue, 8 Apr 2014 08:50:55 +0200 -Subject: [PATCH] 40network: Fix race condition when wait for networks +Subject: 40network: Fix race condition when wait for networks If no network related params are specific, but rd.neednet=1 is set, the default initqueue action is to wait until one of the network @@ -17,11 +17,11 @@ Signed-off-by: Hannes Reinecke modules.d/40network/net-genrules.sh | 3 +++ 1 file changed, 3 insertions(+) -Index: dracut-044/modules.d/40network/net-genrules.sh -=================================================================== ---- dracut-044.orig/modules.d/40network/net-genrules.sh -+++ dracut-044/modules.d/40network/net-genrules.sh -@@ -95,6 +95,9 @@ command -v fix_bootif >/dev/null || . /l +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index b1c156c..d591161 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -95,6 +95,9 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh cond='ACTION=="add", SUBSYSTEM=="net"' # if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules @@ -31,3 +31,6 @@ Index: dracut-044/modules.d/40network/net-genrules.sh fi # if you change the name of "90-net.rules", also change modules.d/80cms/cmssetup.sh +-- +2.6.6 + diff --git a/0048-40network-Only-enable-network-interfaces-if-explicit.patch b/0048-40network-Only-enable-network-interfaces-if-explicit.patch index b2b6450..4b0b271 100644 --- a/0048-40network-Only-enable-network-interfaces-if-explicit.patch +++ b/0048-40network-Only-enable-network-interfaces-if-explicit.patch @@ -1,8 +1,7 @@ -From baf3a57c1fc8d2641c075e2dcdda44f5b26747dc Mon Sep 17 00:00:00 2001 +From 3a951a971fdaa4b51f5375d9b77af0db3c67414e Mon Sep 17 00:00:00 2001 From: Pawel Wieczorkiewicz Date: Tue, 27 May 2014 11:48:43 +0200 -Subject: [PATCH] 40network: Only enable network interfaces if explicitly - requested +Subject: 40network: Only enable network interfaces if explicitly requested Currently all available network interfaces are started whenever 40network is pulled in. This causes massive delays during bootup. @@ -16,11 +15,11 @@ Signed-off-by: Pawel Wieczorkiewicz modules.d/40network/net-genrules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: dracut-044/modules.d/40network/net-genrules.sh -=================================================================== ---- dracut-044.orig/modules.d/40network/net-genrules.sh -+++ dracut-044/modules.d/40network/net-genrules.sh -@@ -94,8 +94,8 @@ command -v fix_bootif >/dev/null || . /l +diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh +index d591161..559b325 100755 +--- a/modules.d/40network/net-genrules.sh ++++ b/modules.d/40network/net-genrules.sh +@@ -94,8 +94,8 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh else cond='ACTION=="add", SUBSYSTEM=="net"' # if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh @@ -30,3 +29,6 @@ Index: dracut-044/modules.d/40network/net-genrules.sh echo "[ -f /tmp/net.*.did-setup ]" >$hookdir/initqueue/finished/wait-network.sh fi fi +-- +2.6.6 + diff --git a/0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch b/0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch index bff4cfc..37915b4 100644 --- a/0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch +++ b/0060-45ifcfg-Add-SUSE-specific-write-ifcfg-file.patch @@ -1,4 +1,4 @@ -From b22afa48bc111794259230cf3144262c719b55f5 Mon Sep 17 00:00:00 2001 +From 105e96464320c8acae22ee730717e071e156aa0b Mon Sep 17 00:00:00 2001 From: Pawel Wieczorkiewicz Date: Wed, 4 Jun 2014 13:00:06 +0200 Subject: 45ifcfg: Add SUSE-specific write-ifcfg file @@ -7,12 +7,13 @@ Signed-off-by: Pawel Wieczorkiewicz --- modules.d/45ifcfg/write-ifcfg-suse.sh | 183 ++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) - create mode 100755 modules.d/45ifcfg/write-ifcfg-suse.sh + create mode 100644 modules.d/45ifcfg/write-ifcfg-suse.sh -Index: dracut-042/modules.d/45ifcfg/write-ifcfg-suse.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-042/modules.d/45ifcfg/write-ifcfg-suse.sh 2015-06-24 18:02:09.389373610 +0200 +diff --git a/modules.d/45ifcfg/write-ifcfg-suse.sh b/modules.d/45ifcfg/write-ifcfg-suse.sh +new file mode 100644 +index 0000000..4b6350f +--- /dev/null ++++ b/modules.d/45ifcfg/write-ifcfg-suse.sh @@ -0,0 +1,183 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- @@ -197,3 +198,6 @@ Index: dracut-042/modules.d/45ifcfg/write-ifcfg-suse.sh + copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network + cp /tmp/leaseinfo.* /run/initramfs/state/var/run/wicked/ +} > /dev/null 2>&1 +-- +2.6.6 + diff --git a/0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch b/0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch index 66125f9..6543410 100644 --- a/0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch +++ b/0061-45ifcfg-Fixup-error-message-in-write-ifcfg-suse.patch @@ -1,4 +1,4 @@ -From 8bbd0f21e9c85898219bdf0f8dc3d31ccfaaf477 Mon Sep 17 00:00:00 2001 +From 7104ea8c873ef89c9aacdd12a542bc71fc738aaa Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 4 Jun 2014 13:12:31 +0200 Subject: 45ifcfg: Fixup error message in write-ifcfg-suse @@ -13,10 +13,10 @@ Signed-off-by: Hannes Reinecke modules.d/45ifcfg/write-ifcfg-suse.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -Index: dracut-042/modules.d/45ifcfg/write-ifcfg-suse.sh -=================================================================== ---- dracut-042.orig/modules.d/45ifcfg/write-ifcfg-suse.sh 2015-06-24 18:02:09.389373610 +0200 -+++ dracut-042/modules.d/45ifcfg/write-ifcfg-suse.sh 2015-06-24 18:02:09.677390007 +0200 +diff --git a/modules.d/45ifcfg/write-ifcfg-suse.sh b/modules.d/45ifcfg/write-ifcfg-suse.sh +index 4b6350f..e9b4d10 100644 +--- a/modules.d/45ifcfg/write-ifcfg-suse.sh ++++ b/modules.d/45ifcfg/write-ifcfg-suse.sh @@ -32,6 +32,7 @@ for netup in /tmp/net.*.did-setup ; do netif=${netup%%.did-setup} @@ -35,3 +35,6 @@ Index: dracut-042/modules.d/45ifcfg/write-ifcfg-suse.sh { echo "# Generated by dracut initrd" echo "NAME='$netif'" +-- +2.6.6 + diff --git a/0066-40network-always-start-netroot-in-ifup.sh.patch b/0066-40network-always-start-netroot-in-ifup.sh.patch index 4369c87..3489d51 100644 --- a/0066-40network-always-start-netroot-in-ifup.sh.patch +++ b/0066-40network-always-start-netroot-in-ifup.sh.patch @@ -1,4 +1,4 @@ -From ad967a08bbf67171a75acc84a9ea2ffbd9461aa5 Mon Sep 17 00:00:00 2001 +From a9a919e44e0ce5cc5bc4167889a31d87626058e4 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 4 Jun 2014 12:04:10 +0200 Subject: 40network: always start netroot in ifup.sh @@ -13,13 +13,13 @@ References: bnc#881235 Signed-off-by: Hannes Reinecke --- - modules.d/40network/ifup.sh | 22 ++++++++-------------- - 1 file changed, 8 insertions(+), 14 deletions(-) + modules.d/40network/ifup.sh | 29 +++++++++++------------------ + 1 file changed, 11 insertions(+), 18 deletions(-) -Index: dracut-044/modules.d/40network/ifup.sh -=================================================================== ---- dracut-044.orig/modules.d/40network/ifup.sh -+++ dracut-044/modules.d/40network/ifup.sh +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 109fb4b..31a04bf 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh @@ -373,27 +373,20 @@ for p in $(getargs ip=); do do_static ;; esac @@ -59,3 +59,6 @@ Index: dracut-044/modules.d/40network/ifup.sh exit 0 done +-- +2.6.6 + diff --git a/0089-40network-create-var-lib-wicked-in-ifup.sh.patch b/0089-40network-create-var-lib-wicked-in-ifup.sh.patch index a74c6e8..9175427 100644 --- a/0089-40network-create-var-lib-wicked-in-ifup.sh.patch +++ b/0089-40network-create-var-lib-wicked-in-ifup.sh.patch @@ -1,4 +1,4 @@ -From af384e51a1dff36b5554b05d2b940d0089c84000 Mon Sep 17 00:00:00 2001 +From 16a940a8fb1fe6697474dc4abb1ce5b5ee281068 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Tue, 1 Jul 2014 08:15:00 +0200 Subject: 40network: create /var/lib/wicked in ifup.sh @@ -13,10 +13,10 @@ Signed-off-by: Hannes Reinecke modules.d/40network/ifup.sh | 2 ++ 1 file changed, 2 insertions(+) -Index: dracut-042/modules.d/40network/ifup.sh -=================================================================== ---- dracut-042.orig/modules.d/40network/ifup.sh 2015-06-24 18:02:06.605215110 +0200 -+++ dracut-042/modules.d/40network/ifup.sh 2015-06-24 18:02:12.961576972 +0200 +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 347c7f7..c7279df 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh @@ -18,6 +18,8 @@ netif=$1 use_bridge='false' use_vlan='false' @@ -26,3 +26,6 @@ Index: dracut-042/modules.d/40network/ifup.sh # enslave this interface to bond? for i in /tmp/bond.*.info; do [ -e "$i" ] || continue +-- +2.6.6 + diff --git a/0188-95dasd_rules-Install-collect-udev-helper-binary.patch b/0188-95dasd_rules-Install-collect-udev-helper-binary.patch new file mode 100644 index 0000000..3fb05d3 --- /dev/null +++ b/0188-95dasd_rules-Install-collect-udev-helper-binary.patch @@ -0,0 +1,25 @@ +From: Thomas Renninger +Date: Mon, 3 Aug 2015 14:07:59 +0200 +Subject: 95dasd_rules: Install 'collect' udev helper binary + +Install the 'collect' udev helper binary for s390-specific rules. + +References: bsc#938867 + +Signed-off-by: Thomas Renninger +--- + modules.d/95dasd_rules/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +Index: dracut-044/modules.d/95dasd_rules/module-setup.sh +=================================================================== +--- dracut-044.orig/modules.d/95dasd_rules/module-setup.sh 2016-04-25 15:02:50.532329644 +0200 ++++ dracut-044/modules.d/95dasd_rules/module-setup.sh 2016-04-25 15:02:52.384434310 +0200 +@@ -45,6 +45,7 @@ depends() { + + # called by dracut + install() { ++ inst_multiple /usr/lib/udev/collect + inst_hook cmdline 30 "$moddir/parse-dasd.sh" + if [[ $hostonly_cmdline == "yes" ]] ; then + local _dasd=$(cmdline) diff --git a/0190-replace-iscsistart-with-systemd-service-files.patch b/0190-replace-iscsistart-with-systemd-service-files.patch index 1e0372b..3747dbe 100644 --- a/0190-replace-iscsistart-with-systemd-service-files.patch +++ b/0190-replace-iscsistart-with-systemd-service-files.patch @@ -18,8 +18,8 @@ Signed-off-by: Thomas Blume Index: dracut-044/modules.d/95iscsi/iscsiroot.sh =================================================================== ---- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2015-11-25 14:22:28.000000000 +0100 -+++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-14 14:52:44.685325362 +0200 +--- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2016-04-18 17:43:51.198589298 +0200 ++++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-18 17:53:11.962323970 +0200 @@ -43,17 +43,13 @@ fi handle_firmware() @@ -136,8 +136,8 @@ Index: dracut-044/modules.d/95iscsi/iscsiroot.sh return 0 Index: dracut-044/modules.d/95iscsi/module-setup.sh =================================================================== ---- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2015-11-25 14:22:28.000000000 +0100 -+++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-14 14:12:39.693392427 +0200 +--- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2016-04-18 17:43:51.198589298 +0200 ++++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-18 17:53:11.962323970 +0200 @@ -4,7 +4,7 @@ check() { local _rootdev @@ -180,16 +180,3 @@ Index: dracut-044/modules.d/95iscsi/module-setup.sh inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" -Index: dracut-044/modules.d/95iscsi/parse-iscsiroot.sh -=================================================================== ---- dracut-044.orig/modules.d/95iscsi/parse-iscsiroot.sh 2015-11-25 14:22:28.000000000 +0100 -+++ dracut-044/modules.d/95iscsi/parse-iscsiroot.sh 2016-04-14 14:12:39.693392427 +0200 -@@ -77,7 +77,7 @@ if [ -n "$iscsiroot" ] ; then - fi - - # iscsi_firmware does not need argument checking --if [ -n "$iscsi_firmware" ]; then -+if [ -n "$iscsi_firmware" ] && iscsiadm -m fw; then - if [ "$root" != "dhcp" ] && [ "$netroot" != "dhcp" ]; then - [ -z "$netroot" ] && netroot=iscsi: - fi diff --git a/0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch b/0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch deleted file mode 100644 index 67dfa15..0000000 --- a/0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch +++ /dev/null @@ -1,135 +0,0 @@ -From: Hannes Reinecke -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 ---- - 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 53179d1..276d1ce 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -45,7 +45,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*} -@@ -56,6 +56,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 -@@ -110,6 +123,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 - } -@@ -244,8 +258,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" --- -1.8.4.5 - -From: Hannes Reinecke -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 ---- - modules.d/95iscsi/module-setup.sh | 18 +++++++++++++++--- - 1 file changed, 15 insertions(+), 3 deletions(-) - -Index: dracut-044/modules.d/95iscsi/module-setup.sh -=================================================================== ---- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2016-04-11 18:03:25.493616825 +0200 -+++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-04-11 18:03:25.613623617 +0200 -@@ -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" diff --git a/0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch b/0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch deleted file mode 100644 index e848088..0000000 --- a/0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch +++ /dev/null @@ -1,168 +0,0 @@ -From: Hannes Reinecke -Date: Tue, 20 Oct 2015 07:59:43 +0200 -Subject: 95iscsi: set 'rd.iscsi.firmware' for qla4xxx sessions - -The qla4xxx driver can run with or without open-iscsi support, -depending on the setting of the 'ql4xdisablesysfsboot' module -parameter. -When the parameter is set to '0', dracut needs to call -'iscsiadm -m fw' to trigger iSCSI login, so we need to set -the 'rd.iscsi.firmware' dracut variable. But this will then -fail if the parameter is set to '1', as in these cases the -list of firmware targets is empty. -To cover both scenarios this patch reshuffles 'handle_firmware' -in iscsiroot.sh to continue if iscsiadm -m fw fails but iscsi -sessions are present. - -References: bsc#951003 - -Signed-off-by: Hannes Reinecke ---- - modules.d/95iscsi/iscsiroot.sh | 23 ++++++++++++++--------- - modules.d/95iscsi/module-setup.sh | 1 + - 2 files changed, 15 insertions(+), 9 deletions(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index 38aff41..1e6ab41 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -54,17 +54,24 @@ set_login_retries() { - handle_firmware() - { - if ! [ -e /tmp/iscsistarted-firmware ]; then -+ # Depending on the 'ql4xdisablesysfsboot' qla4xxx -+ # will be autostarting sessions without presenting -+ # them via the firmware interface. -+ # In these cases 'iscsiadm -m fw' will fail, but -+ # the iSCSI sessions will still be present. - if ! iscsiadm -m fw; then - warn "iscsiadm: Could not get list of targets from firmware." -- return 1 -- fi -+ else - -- for p in $(getargs rd.iscsi.param -d iscsi_param); do -- iscsi_param="$iscsi_param --param $p" -- done -+ for p in $(getargs rd.iscsi.param -d iscsi_param); do -+ iscsi_param="$iscsi_param --param $p" -+ done - -- if ! iscsiadm -m fw -l; then -- warn "iscsiadm: Log-in to iscsi target failed" -+ if ! iscsiadm -m fw -l; then -+ warn "iscsiadm: Log-in to iscsi target failed" -+ else -+ need_shutdown -+ fi - fi - - if [ -d /sys/class/iscsi_session ]; then -@@ -73,8 +80,6 @@ handle_firmware() - else - return 1 - fi -- -- need_shutdown - fi - return 0 - } -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 276d1ce..e29f342 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -66,6 +66,7 @@ install_iscsiroot() { - # qla4xxx flashnode session; skip iBFT discovery - iscsi_initiator=$(cat /sys/class/iscsi_host/${iscsi_host}/initiatorname) - echo "rd.iscsi.initiator=${iscsi_initiator}" -+ echo "rd.iscsi.firmware=1" - return; - fi - done --- -1.8.4.5 - -From: Hannes Reinecke -Date: Tue, 20 Oct 2015 07:59:43 +0200 -Subject: 95iscsi: set 'rd.iscsi.firmware' for qla4xxx sessions - -The qla4xxx driver can run with or without open-iscsi support, -depending on the setting of the 'ql4xdisablesysfsboot' module -parameter. -When the parameter is set to '0', dracut needs to call -'iscsiadm -m fw' to trigger iSCSI login, so we need to set -the 'rd.iscsi.firmware' dracut variable. But this will then -fail if the parameter is set to '1', as in these cases the -list of firmware targets is empty. -To cover both scenarios this patch reshuffles 'handle_firmware' -in iscsiroot.sh to continue if iscsiadm -m fw fails but iscsi -sessions are present. - -References: bsc#951003 - -Signed-off-by: Hannes Reinecke ---- - modules.d/95iscsi/iscsiroot.sh | 23 ++++++++++++++--------- - modules.d/95iscsi/module-setup.sh | 1 + - 2 files changed, 15 insertions(+), 9 deletions(-) - -diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh -index 38aff41..1e6ab41 100755 ---- a/modules.d/95iscsi/iscsiroot.sh -+++ b/modules.d/95iscsi/iscsiroot.sh -@@ -54,17 +54,24 @@ set_login_retries() { - handle_firmware() - { - if ! [ -e /tmp/iscsistarted-firmware ]; then -+ # Depending on the 'ql4xdisablesysfsboot' qla4xxx -+ # will be autostarting sessions without presenting -+ # them via the firmware interface. -+ # In these cases 'iscsiadm -m fw' will fail, but -+ # the iSCSI sessions will still be present. - if ! iscsiadm -m fw; then - warn "iscsiadm: Could not get list of targets from firmware." -- return 1 -- fi -+ else - -- for p in $(getargs rd.iscsi.param -d iscsi_param); do -- iscsi_param="$iscsi_param --param $p" -- done -+ for p in $(getargs rd.iscsi.param -d iscsi_param); do -+ iscsi_param="$iscsi_param --param $p" -+ done - -- if ! iscsiadm -m fw -l; then -- warn "iscsiadm: Log-in to iscsi target failed" -+ if ! iscsiadm -m fw -l; then -+ warn "iscsiadm: Log-in to iscsi target failed" -+ else -+ need_shutdown -+ fi - fi - - if [ -d /sys/class/iscsi_session ]; then -@@ -73,8 +80,6 @@ handle_firmware() - else - return 1 - fi -- -- need_shutdown - fi - return 0 - } -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 276d1ce..e29f342 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -66,6 +66,7 @@ install_iscsiroot() { - # qla4xxx flashnode session; skip iBFT discovery - iscsi_initiator=$(cat /sys/class/iscsi_host/${iscsi_host}/initiatorname) - echo "rd.iscsi.initiator=${iscsi_initiator}" -+ echo "rd.iscsi.firmware=1" - return; - fi - done --- -1.8.4.5 - diff --git a/0196-ibft-wait-for-session-on-all-paths.patch b/0196-ibft-wait-for-session-on-all-paths.patch index 0ac9c6a..cb2a244 100644 --- a/0196-ibft-wait-for-session-on-all-paths.patch +++ b/0196-ibft-wait-for-session-on-all-paths.patch @@ -1,32 +1,28 @@ -Index: dracut-037/modules.d/95iscsi/iscsiroot.sh +Index: dracut-044/modules.d/95iscsi/iscsiroot.sh =================================================================== ---- dracut-037.orig/modules.d/95iscsi/iscsiroot.sh -+++ dracut-037/modules.d/95iscsi/iscsiroot.sh -@@ -54,6 +54,8 @@ set_login_retries() { +--- dracut-044.orig/modules.d/95iscsi/iscsiroot.sh 2016-04-14 15:20:04.089991822 +0200 ++++ dracut-044/modules.d/95iscsi/iscsiroot.sh 2016-04-14 15:22:50.683407266 +0200 +@@ -51,11 +51,23 @@ set_login_retries() { + handle_firmware() { - if ! [ -e /tmp/iscsistarted-firmware ]; then -+ local ifaces retry ++ local ifaces retry + - # Depending on the 'ql4xdisablesysfsboot' qla4xxx - # will be autostarting sessions without presenting - # them via the firmware interface. -@@ -62,10 +64,15 @@ handle_firmware() - if ! iscsiadm -m fw; then - warn "iscsiadm: Could not get list of targets from firmware." - else -+ ifaces=( $(echo /sys/firmware/ibft/ethernet*) ) -+ [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry -+ retry=$(cat /tmp/session-retry) + if ! iscsiadm -m fw; then + warn "iscsiadm: Could not get list of targets from firmware." + return 1 + fi -- for p in $(getargs rd.iscsi.param -d iscsi_param); do -- iscsi_param="$iscsi_param --param $p" -- done -+ if [ $retry -lt ${#ifaces[*]} ]; then -+ let retry++ -+ echo $retry > /tmp/session-retry -+ return 1 -+ fi - - if ! iscsiadm -m fw -l; then - warn "iscsiadm: Log-in to iscsi target failed" ++ ifaces=( $(echo /sys/firmware/ibft/ethernet*) ) ++ [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry ++ retry=$(cat /tmp/session-retry) ++ ++ if [ $retry -lt ${#ifaces[*]} ]; then ++ let retry++ ++ echo $retry > /tmp/session-retry ++ return 1 ++ fi ++ + if ! iscsiadm -m fw -l; then + warn "iscsiadm: Log-in to iscsi target failed" + fi diff --git a/0197-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch b/0197-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch new file mode 100644 index 0000000..00bdd6d --- /dev/null +++ b/0197-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch @@ -0,0 +1,70 @@ +From 4287dca195e2435c7ab20265db6225f97b576fd3 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +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 +--- + 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 + diff --git a/0198-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch b/0198-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch new file mode 100644 index 0000000..93445c1 --- /dev/null +++ b/0198-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch @@ -0,0 +1,82 @@ +From c56c855754914283bb930ef1a2b2dd5e8d5a6f25 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Tue, 20 Oct 2015 07:59:43 +0200 +Subject: 95iscsi: set 'rd.iscsi.firmware' for qla4xxx sessions + +The qla4xxx driver can run with or without open-iscsi support, +depending on the setting of the 'ql4xdisablesysfsboot' module +parameter. +When the parameter is set to '0', dracut needs to call +'iscsiadm -m fw' to trigger iSCSI login, so we need to set +the 'rd.iscsi.firmware' dracut variable. But this will then +fail if the parameter is set to '1', as in these cases the +list of firmware targets is empty. +To cover both scenarios this patch reshuffles 'handle_firmware' +in iscsiroot.sh to continue if iscsiadm -m fw fails but iscsi +sessions are present. + +References: bsc#951003 + +Signed-off-by: Hannes Reinecke +--- + modules.d/95iscsi/iscsiroot.sh | 37 +++++++++++++++++++++---------------- + 1 file changed, 21 insertions(+), 16 deletions(-) + +diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh +index 6ef6276..77755fb 100755 +--- a/modules.d/95iscsi/iscsiroot.sh ++++ b/modules.d/95iscsi/iscsiroot.sh +@@ -53,29 +53,34 @@ handle_firmware() + { + local ifaces retry + ++ # Depending on the 'ql4xdisablesysfsboot' qla4xxx ++ # will be autostarting sessions without presenting ++ # them via the firmware interface. ++ # In these cases 'iscsiadm -m fw' will fail, but ++ # the iSCSI sessions will still be present. + if ! iscsiadm -m fw; then + warn "iscsiadm: Could not get list of targets from firmware." +- return 1 +- fi +- +- ifaces=( $(echo /sys/firmware/ibft/ethernet*) ) +- [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry +- retry=$(cat /tmp/session-retry) +- +- if [ $retry -lt ${#ifaces[*]} ]; then +- let retry++ +- echo $retry > /tmp/session-retry +- return 1 +- fi ++ else ++ ifaces=( $(echo /sys/firmware/ibft/ethernet*) ) ++ [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry ++ retry=$(cat /tmp/session-retry) ++ ++ if [ $retry -lt ${#ifaces[*]} ]; then ++ let retry++ ++ echo $retry > /tmp/session-retry ++ return 1 ++ fi + +- if ! iscsiadm -m fw -l; then +- warn "iscsiadm: Log-in to iscsi target failed" ++ if ! iscsiadm -m fw -l; then ++ warn "iscsiadm: Log-in to iscsi target failed" ++ else ++ need_shutdown ++ fi + fi +- ++ [ -d /sys/class/iscsi_session ] || return 1 + echo 'started' > "/tmp/iscsistarted-iscsi:" + echo 'started' > "/tmp/iscsistarted-firmware" + +- need_shutdown + return 0 + } + +-- +2.6.6 + diff --git a/0211-fix_multipath_check_hostonly.patch b/0211-fix_multipath_check_hostonly.patch index 80854dd..5599cbd 100644 --- a/0211-fix_multipath_check_hostonly.patch +++ b/0211-fix_multipath_check_hostonly.patch @@ -11,16 +11,18 @@ warning if not present. This patch fixes the wrong ordering. Index: dracut-044/modules.d/90multipath/module-setup.sh =================================================================== ---- dracut-044.orig/modules.d/90multipath/module-setup.sh -+++ dracut-044/modules.d/90multipath/module-setup.sh -@@ -20,13 +20,14 @@ majmin_to_mpath_dev() { +--- dracut-044.orig/modules.d/90multipath/module-setup.sh 2016-04-19 13:58:59.445320244 +0200 ++++ dracut-044/modules.d/90multipath/module-setup.sh 2016-04-19 13:59:41.467698870 +0200 +@@ -3,8 +3,6 @@ # called by dracut check() { local _rootdev - # if there's no multipath binary, no go. - require_binaries multipath || return 1 - [[ $hostonly ]] || [[ $mount_needs ]] && { + is_mpath() { + local _dev=$1 +@@ -17,6 +15,9 @@ check() { for_each_host_dev_and_slaves is_mpath || return 255 } diff --git a/0212-fcoe_reorder_init_path.patch b/0212-fcoe_reorder_init_path.patch new file mode 100644 index 0000000..f9954c3 --- /dev/null +++ b/0212-fcoe_reorder_init_path.patch @@ -0,0 +1,44 @@ +From: Johannes Thumshirn +References: bsc#982588 + +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -45,7 +45,16 @@ write_fcoemon_cfg() { + echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif + } + +-if [ "$dcb" = "dcb" ]; then ++if [ "$netdriver" = "bnx2x" ]; then ++ # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan ++ modprobe 8021q ++ udevadm settle --timeout=30 ++ # Sleep for 3 s to allow dcb negotiation ++ sleep 3 ++ write_fcoemon_cfg ++ fcoemon --syslog=yes ++ fipvlan -c -s "$netif" ++elif [ "$dcb" = "dcb" ]; then + # wait for lldpad to be ready + i=0 + while [ $i -lt 60 ]; do +@@ -79,18 +88,11 @@ if [ "$dcb" = "dcb" ]; then + sleep 1 + + write_fcoemon_cfg +- fcoemon --syslog +-elif [ "$netdriver" = "bnx2x" ]; then +- # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan +- modprobe 8021q +- udevadm settle --timeout=30 +- # Sleep for 3 s to allow dcb negotiation +- sleep 3 +- fipvlan "$netif" -c -s ++ fcoemon --syslog=yes + else + vlan="no" + write_fcoemon_cfg +- fcoemon --syslog ++ fcoemon --syslog=yes + fi + + need_shutdown diff --git a/0302-Revert-90multipath-add-hostonly-multipath.conf-in-ca.patch b/0302-Revert-90multipath-add-hostonly-multipath.conf-in-ca.patch new file mode 100644 index 0000000..591bf78 --- /dev/null +++ b/0302-Revert-90multipath-add-hostonly-multipath.conf-in-ca.patch @@ -0,0 +1,88 @@ +From c9f18fcc4b7a4b31cc1f68d9e5e1c2d6625871ca Mon Sep 17 00:00:00 2001 +From: Dave Young +Date: Wed, 4 May 2016 12:46:12 +0200 +Subject: Revert '90multipath: add hostonly multipath.conf in case hostonly + mode' + +Patch is incompatible with SUSE, which doesn't have mpathconf. + +Signed-off-by: Thomas Renninger +--- + modules.d/90multipath/module-setup.sh | 42 +++++++---------------------------- + 1 file changed, 8 insertions(+), 34 deletions(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 831c99f..c2c85c4 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -1,28 +1,18 @@ + #!/bin/bash + +-is_mpath() { +- local _dev=$1 +- [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 +- [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ mpath- ]] && return 0 +- return 1 +-} +- +-majmin_to_mpath_dev() { +- local _dev +- for i in `ls -1 /dev/mapper/mpath*`; do +- dev=$(get_maj_min $i) +- if [ "$dev" = "$1" ]; then +- echo $i +- return +- fi +- done +-} + # called by dracut + check() { + local _rootdev + # if there's no multipath binary, no go. + require_binaries multipath || return 1 + ++ is_mpath() { ++ local _dev=$1 ++ [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 ++ [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ mpath- ]] && return 0 ++ return 1 ++ } ++ + [[ $hostonly ]] || [[ $mount_needs ]] && { + for_each_host_dev_and_slaves is_mpath || return 255 + } +@@ -89,18 +79,7 @@ installkernel() { + + # called by dracut + install() { +- local _f _allow +- add_hostonly_mpath_conf() { +- is_mpath $1 && { +- local _dev +- +- _dev=$(majmin_to_mpath_dev $1) +- [ -z "$_dev" ] && return +- strstr "$_allow" "$_dev" && return +- _allow="$_allow --allow $_dev" +- } +- } +- ++ local _f + inst_multiple -o \ + dmsetup \ + kpartx \ +@@ -114,11 +93,6 @@ install() { + /etc/multipath.conf \ + /etc/multipath/* + +- [[ $hostonly ]] && { +- for_each_host_dev_and_slaves_all add_hostonly_mpath_conf +- [ -n "$_allow" ] && mpathconf $_allow --outfile ${initdir}/etc/multipath.conf +- } +- + inst $(command -v partx) /sbin/partx + + inst_libdir_file "libmultipath*" "multipath/*" +-- +2.6.6 + diff --git a/0403-95lunmask-Add-module-to-handle-LUN-masking.patch b/0403-95lunmask-Add-module-to-handle-LUN-masking.patch index 11a2f43..2fd740a 100644 --- a/0403-95lunmask-Add-module-to-handle-LUN-masking.patch +++ b/0403-95lunmask-Add-module-to-handle-LUN-masking.patch @@ -1,9 +1,9 @@ -From 1d427bcf3527ba96828a4bd5231409967ff096b4 Mon Sep 17 00:00:00 2001 +From 0f353853241e002658a9870419a7930fc3414b18 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 11 Nov 2015 12:20:33 +0100 -Subject: [PATCH] 95lunmask: Add module to handle LUN masking +Subject: 95lunmask: Add module to handle LUN masking -Using the module option 'scsi_mod.scan=disabled' +Using the module option 'scsi_mod.scan=manual' this implements LUN masking by selectively enable only those devices required for booting. @@ -16,15 +16,16 @@ Signed-off-by: Hannes Reinecke modules.d/95lunmask/parse-lunmask.sh | 40 +++++++++++++++ modules.d/95lunmask/sas_transport_scan_lun.sh | 26 ++++++++++ 4 files changed, 162 insertions(+) - create mode 100755 modules.d/95lunmask/fc_transport_scan_lun.sh - create mode 100755 modules.d/95lunmask/module-setup.sh - create mode 100755 modules.d/95lunmask/parse-lunmask.sh - create mode 100755 modules.d/95lunmask/sas_transport_scan_lun.sh + create mode 100644 modules.d/95lunmask/fc_transport_scan_lun.sh + create mode 100644 modules.d/95lunmask/module-setup.sh + create mode 100644 modules.d/95lunmask/parse-lunmask.sh + create mode 100644 modules.d/95lunmask/sas_transport_scan_lun.sh -Index: dracut-044/modules.d/95lunmask/fc_transport_scan_lun.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-044/modules.d/95lunmask/fc_transport_scan_lun.sh 2016-04-12 13:13:27.189597634 +0200 +diff --git a/modules.d/95lunmask/fc_transport_scan_lun.sh b/modules.d/95lunmask/fc_transport_scan_lun.sh +new file mode 100644 +index 0000000..d9f84a3 +--- /dev/null ++++ b/modules.d/95lunmask/fc_transport_scan_lun.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# @@ -52,10 +53,11 @@ Index: dracut-044/modules.d/95lunmask/fc_transport_scan_lun.sh +fi +[ -z "$TARGET" ] && exit 1 +echo $CHANNEL $TARGET $LUN > /sys/class/scsi_host/host$HOST/scan -Index: dracut-044/modules.d/95lunmask/module-setup.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-044/modules.d/95lunmask/module-setup.sh 2016-04-12 13:13:27.193597860 +0200 +diff --git a/modules.d/95lunmask/module-setup.sh b/modules.d/95lunmask/module-setup.sh +new file mode 100644 +index 0000000..6afaed2 +--- /dev/null ++++ b/modules.d/95lunmask/module-setup.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- @@ -103,7 +105,7 @@ Index: dracut-044/modules.d/95lunmask/module-setup.sh + [[ $hostonly ]] || [[ $mount_needs ]] && { + [ -w /sys/module/scsi_mod/parameters/scan ] || return 255 + scan_type=$(cat /sys/module/scsi_mod/parameters/scan) -+ [ "$scan_type" = "disabled" ] && return 0 ++ [ "$scan_type" = "manual" ] && return 0 + return 255 + } + return 0 @@ -127,10 +129,11 @@ Index: dracut-044/modules.d/95lunmask/module-setup.sh + done + fi +} -Index: dracut-044/modules.d/95lunmask/parse-lunmask.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-044/modules.d/95lunmask/parse-lunmask.sh 2016-04-12 13:13:27.193597860 +0200 +diff --git a/modules.d/95lunmask/parse-lunmask.sh b/modules.d/95lunmask/parse-lunmask.sh +new file mode 100644 +index 0000000..6646876 +--- /dev/null ++++ b/modules.d/95lunmask/parse-lunmask.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- @@ -165,17 +168,18 @@ Index: dracut-044/modules.d/95lunmask/parse-lunmask.sh + set $lunmask_arg + IFS="$OLDIFS" + if [ -d /sys/module/scsi_mod ] ; then -+ echo -n "disabled" > /sys/module/scsi_mod/parameters/scan ++ echo -n "manual" > /sys/module/scsi_mod/parameters/scan + elif [ ! -f /etc/modprobe.d/95lunmask.conf ] ; then -+ echo "options scsi_mod scan=disabled" > /etc/modprobe.d/95lunmask.conf ++ echo "options scsi_mod scan=manual" > /etc/modprobe.d/95lunmask.conf + fi + create_udev_rule $1 $2 $3 + ) +done -Index: dracut-044/modules.d/95lunmask/sas_transport_scan_lun.sh -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dracut-044/modules.d/95lunmask/sas_transport_scan_lun.sh 2016-04-12 13:13:27.193597860 +0200 +diff --git a/modules.d/95lunmask/sas_transport_scan_lun.sh b/modules.d/95lunmask/sas_transport_scan_lun.sh +new file mode 100644 +index 0000000..f7702f8 +--- /dev/null ++++ b/modules.d/95lunmask/sas_transport_scan_lun.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# @@ -203,3 +207,6 @@ Index: dracut-044/modules.d/95lunmask/sas_transport_scan_lun.sh +fi +[ -z "$TARGET" ] && exit 1 +echo 0 $TARGET $LUN > /sys/class/scsi_host/host$HOST/scan +-- +2.6.6 + diff --git a/0500-Reset-IFS-variable.patch b/0500-Reset-IFS-variable.patch new file mode 100644 index 0000000..e9419d3 --- /dev/null +++ b/0500-Reset-IFS-variable.patch @@ -0,0 +1,99 @@ +From bcfdc4522d2f04d0a1fd46d80a8ac7ff357b8bc5 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 14 Jul 2014 10:22:31 +0200 +Subject: Reset IFS variable + +Setting and unsetting the IFS variable is tricky. To be on the +safe side we should always reset the IFS variable to its original +value after parsing. + +Signed-off-by: Hannes Reinecke +--- + modules.d/95dasd/parse-dasd.sh | 2 ++ + modules.d/95zfcp/parse-zfcp.sh | 2 ++ + 3 files changed, 6 insertions(+) + +Index: dracut-044/modules.d/95dasd/parse-dasd.sh +=================================================================== +--- dracut-044.orig/modules.d/95dasd/parse-dasd.sh 2015-11-25 14:22:28.000000000 +0100 ++++ dracut-044/modules.d/95dasd/parse-dasd.sh 2016-04-26 15:12:30.739569930 +0200 +@@ -1,8 +1,10 @@ + #!/bin/sh + for dasd_arg in $(getargs rd.dasd= -d rd_DASD= DASD=); do + ( ++ local OLDIFS="$IFS" + IFS="," + set -- $dasd_arg ++ IFS="$OLDIFS" + echo "$@" | normalize_dasd_arg >> /etc/dasd.conf + ) + done +Index: dracut-044/modules.d/95dasd_rules/parse-dasd.sh +=================================================================== +--- dracut-044.orig/modules.d/95dasd_rules/parse-dasd.sh 2016-04-26 15:12:29.575504027 +0200 ++++ dracut-044/modules.d/95dasd_rules/parse-dasd.sh 2016-04-26 15:16:13.780196465 +0200 +@@ -59,8 +59,10 @@ for dasd_arg in $(getargs root=) $(getar + ;; + esac + if [ -n "$ccw_arg" ] ; then ++ OLDIFS="$IFS" + IFS="-" + set -- $ccw_arg ++ IFS="$OLDIFS" + create_udev_rule $2 + fi + ) +@@ -68,9 +70,10 @@ done + + for dasd_arg in $(getargs rd.dasd=); do + ( ++ OLDIFS="$IFS" + IFS="," + set -- $dasd_arg +- unset IFS ++ IFS="$OLDIFS" + while (($# > 0)); do + case $1 in + autodetect|probeonly) +@@ -78,13 +81,14 @@ for dasd_arg in $(getargs rd.dasd=); do + ;; + *-*) + range=$1 ++ OLDIFS="$IFS" + IFS="-" + set -- $range + start=${1#0.0.} + shift + end=${1#0.0.} + shift +- unset IFS ++ IFS="$OLDIFS" + for dev in $(seq $(( 16#$start )) $(( 16#$end )) ) ; do + create_udev_rule $(printf "0.0.%04x" "$dev") + done +Index: dracut-044/modules.d/95zfcp_rules/parse-zfcp.sh +=================================================================== +--- dracut-044.orig/modules.d/95zfcp_rules/parse-zfcp.sh 2016-04-26 15:12:30.051530977 +0200 ++++ dracut-044/modules.d/95zfcp_rules/parse-zfcp.sh 2016-04-26 15:17:31.484595325 +0200 +@@ -53,8 +53,10 @@ fi + + for zfcp_arg in $(getargs rd.zfcp); do + ( ++ OLDIFS="$IFS" + IFS="," + set $zfcp_arg ++ IFS="$OLDIFS" + create_udev_rule $1 $2 $3 + ) + done +@@ -70,8 +72,10 @@ for zfcp_arg in $(getargs root=) $(getar + ;; + esac + if [ -n "$ccw_arg" ] ; then ++ OLDIFS="$IFS" + IFS="-" + set -- $ccw_arg ++ IFS="$OLDIFS" + _wwpn=${4%:*} + _lun=${4#*:} + create_udev_rule $2 $wwpn $lun diff --git a/dracut.changes b/dracut.changes index ef1dfc1..7722b88 100644 --- a/dracut.changes +++ b/dracut.changes @@ -1,19 +1,63 @@ +------------------------------------------------------------------- +Fri Jun 3 14:05:36 UTC 2016 - trenn@suse.de + +- FCOE fix bsc#982588 + * Add 0212-fcoe_reorder_init_path.patch + +------------------------------------------------------------------- +Wed May 4 15:40:37 CEST 2016 - hare@suse.de + +- 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) + +------------------------------------------------------------------- +Tue Apr 26 10:01:19 UTC 2016 - trenn@suse.de + +- Add IFS restoring where it has been lost due to mainline merging + (bsc#977117) +*Add 0500-Reset-IFS-variable.patch + +------------------------------------------------------------------- +Mon Apr 25 12:55:06 UTC 2016 - trenn@suse.de + +- Make sure to install collect binary (bsc#976466) +* Add: 0188-95dasd_rules-Install-collect-udev-helper-binary.patch + +------------------------------------------------------------------- +Wed Apr 20 10:15:34 UTC 2016 - trenn@suse.de + +- Remove version from requires on subpackage +- Add a split provide because of the package split for SLE12 SP1 to SP2 upgrade + ------------------------------------------------------------------- Tue Apr 12 14:05:55 UTC 2016 - trenn@suse.de - Forward port of latest SLES patches (fate#320499) Add: - * 0170-iscsi-skip-ibft-invalid-dhcp.patch - * 0160-s390-update_active_devices_initrd.patch - * 0161-95zfcp_rules-simplified-rd.zfcp-commandline-for-NPIV.patch - * 0190-replace-iscsistart-with-systemd-service-files.patch - * 0191-static_network_setup_return_zero.patch - * 0192-iscsi_set_boot_protocol_from_ifcfg.patch - * 0193-95iscsi-Set-number-of-login-retries.patch + * 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) + * 0192-iscsi_set_boot_protocol_from_ifcfg.patch (bsc#919179) + * 0193-95iscsi-Set-number-of-login-retries.patch (bsc#951003) + * 0196-ibft-wait-for-session-on-all-paths.patch (bsc#951003) + * 0403-95lunmask-Add-module-to-handle-LUN-masking.patch (FATE#319786) + +Added, but still commented in spec file (still needs adjusting): +- Fixup booting from qla4xxx (bsc#951003) * 0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch * 0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch - * 0196-ibft-wait-for-session-on-all-paths.patch - * 0403-95lunmask-Add-module-to-handle-LUN-masking.patch + ------------------------------------------------------------------- Wed Mar 30 22:27:06 UTC 2016 - dmueller@suse.com diff --git a/dracut.spec b/dracut.spec index 9ddfc30..46f56a0 100644 --- a/dracut.spec +++ b/dracut.spec @@ -82,6 +82,7 @@ Patch123: 0123-95zfcp_rules-fix-typo-in-module_setup.patch Patch157: 0157-Add-boot-zipl-to-host-devs-if-it-is-a-mount-point.patch Patch160: 0160-s390-update_active_devices_initrd.patch Patch161: 0161-95zfcp_rules-simplified-rd.zfcp-commandline-for-NPIV.patch +Patch188: 0188-95dasd_rules-Install-collect-udev-helper-binary.patch #FIPS Patch53: 0053-01fips-fixup-loading-issues.patch @@ -113,10 +114,9 @@ Patch190: 0190-replace-iscsistart-with-systemd-service-files.patch Patch191: 0191-static_network_setup_return_zero.patch Patch192: 0192-iscsi_set_boot_protocol_from_ifcfg.patch Patch193: 0193-95iscsi-Set-number-of-login-retries.patch -# ToDo for author (hare/tsaupe): Fix up and adjust to mainline code -#Patch194: 0194-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch -#Patch195: 0195-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch Patch196: 0196-ibft-wait-for-session-on-all-paths.patch +Patch197: 0197-95iscsi-Do-not-require-network-for-qla4xxx-flash-ses.patch +Patch198: 0198-95iscsi-set-rd.iscsi.firmware-for-qla4xxx-sessions.patch # Submit mainline asap Patch128: 0128-90lvm-Install-dm-snapshot-module.patch @@ -131,16 +131,21 @@ Patch207: 0207-handle_module_aliases.patch Patch208: 0208-no_forced_virtnet.patch Patch209: 0209-fix_modules_load_d_hostonly.patch Patch210: 0210-add_fcoe_uefi_check.patch -Patch211: 0211-fix_multipath_check_hostonly.patch +Patch212: 0212-fcoe_reorder_init_path.patch # SUSE-specific fixes Patch300: 0300-dracut_dont_use_dpkg_defaults_on_SUSE.patch Patch301: 0301-include_sysconfig_language.patch +Patch302: 0302-Revert-90multipath-add-hostonly-multipath.conf-in-ca.patch +Patch211: 0211-fix_multipath_check_hostonly.patch # New features/improvements Patch402: 0402-driver-fail-summary.patch Patch403: 0403-95lunmask-Add-module-to-handle-LUN-masking.patch +# On top patches/fixes which have to be applied late +Patch500: 0500-Reset-IFS-variable.patch + BuildRequires: asciidoc BuildRequires: bash BuildRequires: docbook-xsl-stylesheets @@ -194,13 +199,16 @@ and its cryptography during startup. %package tools Summary: Tools to build a local initramfs Group: System/Base -Requires: %{name} = %{version}-%{release} +Requires: %{name} +# split-provides for upgrade from SLES12 SP1 to SLES12 SP2 +Provides: %{name}:%{_bindir}/dracut-catimages %description tools This package contains tools to assemble the local initrd and host configuration. %prep %setup -q + %patch12 -p1 %patch13 -p1 %patch15 -p1 @@ -275,14 +283,15 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh %patch180 -p1 %patch182 -p1 %patch183 -p1 +%patch188 -p1 %patch190 -p1 %patch191 -p1 %patch192 -p1 %patch193 -p1 -#%patch194 -p1 -#%patch195 -p1 %patch196 -p1 +%patch197 -p1 +%patch198 -p1 %patch200 -p1 %patch201 -p1 @@ -295,14 +304,18 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh %patch208 -p1 %patch209 -p1 %patch210 -p1 -%patch211 -p1 +%patch212 -p1 %patch300 -p1 %patch301 -p1 +%patch302 -p1 +%patch211 -p1 %patch402 -p1 %patch403 -p1 +%patch500 -p1 + %build %configure\ --systemdsystemunitdir=%{_unitdir}\