dracut/0595-iscsi-don-t-continue-waiting-if-the-root-device-is-p.patch
Daniel Molkentin 57f8729f24 Accepting request 698238 from home:dmolkentin:branches:Base:System
- dracut-lib.sh:dev_unit_name() guard against $dev beginning with "-" (bsc#1132448)
  * adds 0601-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch 

- 95iscsi: avoid error messages when building initrd, multipath timeouts
  (bsc#1130114, bsc#1130107, bsc#1121238)
  * adds 0595-iscsi-don-t-continue-waiting-if-the-root-device-is-p.patch
  * adds 0596-network-stop-waiting-for-interfaces-if-root-device-i.patch
  * adds 0597-iscsiroot-parse_iscsi_root-overwrites-command-line-a.patch
  * adds 0598-iscsiroot-there-s-never-more-than-one-target-per-cal.patch
  * adds 0599-iscsiroot-try-targets-only-once.patch
  * adds 0600-iscsiroot-remove-bashisms.patch

  (bsc#1089332)

OBS-URL: https://build.opensuse.org/request/show/698238
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=373
2019-04-26 13:35:25 +00:00

43 lines
2.0 KiB
Diff

From 06d95ed6eb72ad9b1a4666b3d7cb6977e5b83ca5 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Thu, 21 Mar 2019 16:27:04 +0100
Subject: [PATCH 1/6] iscsi: don't continue waiting if the root device is
present
dracut waits for every iscsiroot connection to be established
before switching root. This is not necessary in multipath scenarios,
where a single path is usually sufficient to set up the root device,
and where users expect booting to succeed unless all paths are down.
Don't wait for the iscsi portal to start if the root device has
already been found.
---
modules.d/95iscsi/parse-iscsiroot.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
index f884e684..b96605ef 100755
--- a/modules.d/95iscsi/parse-iscsiroot.sh
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
@@ -84,7 +84,7 @@ if [ -n "$iscsi_firmware" ]; then
modprobe -b -q iscsi_boot_sysfs 2>/dev/null
modprobe -b -q iscsi_ibft
# if no ip= is given, but firmware
- echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh
+ echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh
initqueue --unique --online /sbin/iscsiroot online "iscsi:" "$NEWROOT"
initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "iscsi:" "$NEWROOT"
initqueue --unique --onetime --settled /sbin/iscsiroot online "iscsi:" "'$NEWROOT'"
@@ -147,7 +147,7 @@ for nroot in $(getargs netroot); do
type parse_iscsi_root >/dev/null 2>&1 || . /lib/net-lib.sh
parse_iscsi_root "$nroot" || return 1
netroot_enc=$(str_replace "$nroot" '/' '\2f')
- echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh
+ echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh
done
# Done, all good!
--
2.16.4