Blame SOURCES/0541-Skip-iscsi-attachment-if-no-info.patch

18971c
From 903d6fc2fc8a050caceb6f95363f6cc4572b9fc3 Mon Sep 17 00:00:00 2001
18971c
From: Derek Higgins <derekh@redhat.com>
18971c
Date: Thu, 26 Oct 2017 15:29:42 +0100
18971c
Subject: [PATCH] Skip iscsi attachment if no info
18971c
18971c
If no iscsi session information can be retrieved from the firmware
18971c
then skip the iscsi attachment and allow the boot process to continue.
18971c
Ensure the timeout scripts don't hit their timeout waiting for
18971c
/tmp/iscsistarted-firmware to be created.
18971c
This will allow a common image to be used for servers with both a
18971c
local and iscsi root with rd.iscsi.firmware set.
18971c
18971c
Cherry-picked from: 9408a2ac330970e98dc4d289ec3ffb163f0517d1
18971c
Resolves: #1513397
18971c
---
18971c
 modules.d/95iscsi/iscsiroot.sh | 5 +++--
18971c
 1 file changed, 3 insertions(+), 2 deletions(-)
18971c
18971c
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
18971c
index 4cf3d355..c93ff068 100755
18971c
--- a/modules.d/95iscsi/iscsiroot.sh
18971c
+++ b/modules.d/95iscsi/iscsiroot.sh
18971c
@@ -46,8 +46,9 @@ fi
18971c
 handle_firmware()
18971c
 {
18971c
     if ! iscsistart -f; then
18971c
-        warn "iscistart: Could not get list of targets from firmware."
18971c
-        return 1
18971c
+        warn "iscistart: Could not get list of targets from firmware. Skipping."
18971c
+        echo 'skipped' > "/tmp/iscsistarted-firmware"
18971c
+        return 0
18971c
     fi
18971c
 
18971c
     for p in $(getargs rd.iscsi.param -d iscsi_param); do