Currently we retrieve all the necessary information of an iSCSI session
and pass them to 2nd kernel. This is wrong way to go for hardware iscsi,
because dracut has already had its own infrastructure to do bring up any
iscsi device configured in firmware of an HBA (Host Bus Bridge).
This patch will determine if an iscsi session is established by firmware
configured iscsi. If it does, then we don't pass anything down to 2nd
kernel. dracut will handle it.
Signed-off-by: WANG Chao <chaowang(a)redhat.com>
---
dracut-module-setup.sh | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 780601a..18f2294 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -469,7 +469,24 @@ kdump_is_iscsi_ibft_cmdline() {
return 1
}
-# No ibft handling yet.
+# Sanity check if an iscsi session is established by iBFT or firmware
+kdump_is_iscsi_fw() {
+
+ if kdump_is_iscsi_hw_cmdline && kdump_is_iscsi_hw_session $1; then
+ return 0
+ fi
+
+ if kdump_is_iscsi_ibft_cmdline && kdump_is_iscsi_ibft_session $1; then
+ return 0
+ fi
+
+ return 1
+}
+
+#
+# FIXME: No ibft handling yet. We need to finish the work in
+# kdump_is_iscsi_ibft_session()
+#
kdump_setup_iscsi_device() {
local path=$1
local tgt_name; local tgt_ipaddr;
@@ -492,6 +509,10 @@ kdump_setup_iscsi_device() {
return 1
fi
+ if kdump_is_iscsi_fw ${path}; then
+ return 0
+ fi
+
tgt_name=$(kdump_iscsi_get_rec_val ${path} "node.name")
tgt_ipaddr=$(kdump_iscsi_get_rec_val ${path} "node.conn\[0\].address")
--
1.9.3