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

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