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