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.
I read some iscsi code and I also talked with storage QE. It's confirmed that software iscsi will use "tcp" transport class while hardware iscsi will use like "be2iscsi" "bnx2i" transport class. It's ok to use the transport name of an iface of a scsi session to determine hardware iscsi or not. Additionally using "iscsi_firmware" "rd.iscsi.firmware" to determine if the system is iscsi boot, because dracut can only handle this case.
Along this patch, I add the infrastructure of determine iBFT, but it's not complete yet. Mark the part as "FIXME". Once customer is asking or maybe I get hold of iBFT box, I can start working on it.
Signed-off-by: WANG Chao chaowang@redhat.com --- dracut-module-setup.sh | 77 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index dcebc47..9616866 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -411,7 +411,78 @@ kdump_get_iscsi_initiator() { return 1 }
-# No ibft handling yet. +# Determine hardware iscsi by an iface's transport class. +# If transport class is tcp, it's software iscsi. +# If it's be2iscsi, bnx2i, cxgb3i, cxgb4i, it's hardware iscsi. +kdump_is_iscsi_hw_session() { + if [ "$(kdump_iscsi_get_rec_val $1 "iface.transport_name")" = tcp ]; then + return 1 + fi + + return 0 +} + +# FIXME: determine iBFT +kdump_is_iscsi_ibft_session() { + return 1 +} + +# kernel cmdline must contain these either of the following arguments +# for booting off hardware iSCSI: +# rd.iscsi.firmware[=1], iscsi_firmware +kdump_is_iscsi_hw_cmdline() { + local cmdline + + cmdline="$(cat /proc/cmdline)" + + for arg in $cmdline; do + case "$arg" in + "rd.iscsi.firmware" |\ + "rd.iscsi.firmware=1" |\ + "iscsi_firmware") + return 0 + ;; + esac + done + + return 1 +} + +# kernel cmdline must contain these either of the following arguments +# for booting off iBFT: +# rd.iscsi.ibft[=1], ip=ibft +kdump_is_iscsi_ibft_cmdline() { + local cmdline + + cmdline="$(cat /proc/cmdline)" + + for arg in $cmdline; do + case "$arg" in + "rd.iscsi.ibft" |\ + "rd.iscsi.ibft=1" |\ + "ip=ibft") + return 0 + ;; + esac + done + + return 1 +} + +# 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 +} + kdump_setup_iscsi_device() { local path=$1 local tgt_name; local tgt_ipaddr; @@ -434,6 +505,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")
Hi,
Well done, thanks Chao.
Vivek/Bao/Minfei, could you review the patch as well?
On 10/28/14 at 06:43pm, WANG Chao wrote:
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.
I read some iscsi code and I also talked with storage QE. It's confirmed that software iscsi will use "tcp" transport class while hardware iscsi will use like "be2iscsi" "bnx2i" transport class. It's ok to use the transport name of an iface of a scsi session to determine hardware iscsi or not. Additionally using "iscsi_firmware" "rd.iscsi.firmware" to determine if the system is iscsi boot, because dracut can only handle this case.
Along this patch, I add the infrastructure of determine iBFT, but it's not complete yet. Mark the part as "FIXME". Once customer is asking or maybe I get hold of iBFT box, I can start working on it.
For non-root hwiscsi there's no kernel cmdline, you can put it in todo list We can support root device firstly and see if it works well.
Signed-off-by: WANG Chao chaowang@redhat.com
dracut-module-setup.sh | 77 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index dcebc47..9616866 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -411,7 +411,78 @@ kdump_get_iscsi_initiator() { return 1 }
-# No ibft handling yet. +# Determine hardware iscsi by an iface's transport class. +# If transport class is tcp, it's software iscsi. +# If it's be2iscsi, bnx2i, cxgb3i, cxgb4i, it's hardware iscsi. +kdump_is_iscsi_hw_session() {
- if [ "$(kdump_iscsi_get_rec_val $1 "iface.transport_name")" = tcp ]; then
return 1
- fi
- return 0
+}
+# FIXME: determine iBFT +kdump_is_iscsi_ibft_session() {
- return 1
+}
+# kernel cmdline must contain these either of the following arguments +# for booting off hardware iSCSI: +# rd.iscsi.firmware[=1], iscsi_firmware +kdump_is_iscsi_hw_cmdline() {
- local cmdline
- cmdline="$(cat /proc/cmdline)"
- for arg in $cmdline; do
case "$arg" in
"rd.iscsi.firmware" |\
"rd.iscsi.firmware=1" |\
"iscsi_firmware")
dracut.cmdline manpage shows below: iscsi_firmware rd.iscsi.firmware=0
So looks like iscsi_firmware == rd.iscsi.firmware=0
return 0
;;
esac
- done
- return 1
+}
+# kernel cmdline must contain these either of the following arguments +# for booting off iBFT: +# rd.iscsi.ibft[=1], ip=ibft +kdump_is_iscsi_ibft_cmdline() {
- local cmdline
- cmdline="$(cat /proc/cmdline)"
- for arg in $cmdline; do
case "$arg" in
"rd.iscsi.ibft" |\
"rd.iscsi.ibft=1" |\
"ip=ibft")
return 0
;;
esac
- done
- return 1
+}
+# 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
+}
kdump_setup_iscsi_device() { local path=$1 local tgt_name; local tgt_ipaddr; @@ -434,6 +505,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
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On 11/03/14 at 10:33am, Dave Young wrote:
Hi,
Well done, thanks Chao.
Vivek/Bao/Minfei, could you review the patch as well?
On 10/28/14 at 06:43pm, WANG Chao wrote:
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.
I read some iscsi code and I also talked with storage QE. It's confirmed that software iscsi will use "tcp" transport class while hardware iscsi will use like "be2iscsi" "bnx2i" transport class. It's ok to use the transport name of an iface of a scsi session to determine hardware iscsi or not. Additionally using "iscsi_firmware" "rd.iscsi.firmware" to determine if the system is iscsi boot, because dracut can only handle this case.
Along this patch, I add the infrastructure of determine iBFT, but it's not complete yet. Mark the part as "FIXME". Once customer is asking or maybe I get hold of iBFT box, I can start working on it.
For non-root hwiscsi there's no kernel cmdline, you can put it in todo list We can support root device firstly and see if it works well.
Yes, that's TODO and nice-to-have. My concern is that in 2nd kernel, not all hardware/driver works as fine as it does in 1st kernel. I've heard a few cases that certain driver won't work at 2nd kernel. I found one bug myself:
https://bugzilla.redhat.com/show_bug.cgi?id=1158014 [kdump] [be2iscsi]: IP: [<ffffffffa00cf700>] hwi_get_async_handle.isra.23.constprop.39+0x90/0x1d0 [be2iscsi]
So I think it can be safer to use iscsi_tcp (software driver, no offload) instead of using hardware associated offload driver. What do you think?
[..]
+# kernel cmdline must contain these either of the following arguments +# for booting off hardware iSCSI: +# rd.iscsi.firmware[=1], iscsi_firmware +kdump_is_iscsi_hw_cmdline() {
- local cmdline
- cmdline="$(cat /proc/cmdline)"
- for arg in $cmdline; do
case "$arg" in
"rd.iscsi.firmware" |\
"rd.iscsi.firmware=1" |\
"iscsi_firmware")
dracut.cmdline manpage shows below: iscsi_firmware rd.iscsi.firmware=0
So looks like iscsi_firmware == rd.iscsi.firmware=0
That's a documentation issue in dracut. iscsi_firmware actually is deprecated by rd.iscsi.firmware=1. You can send a patch to Harald to fix it.
Thanks WANG Chao
On 10/28/14 at 06:43pm, WANG Chao wrote:
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.
I read some iscsi code and I also talked with storage QE. It's confirmed that software iscsi will use "tcp" transport class while hardware iscsi will use like "be2iscsi" "bnx2i" transport class. It's ok to use the transport name of an iface of a scsi session to determine hardware iscsi or not. Additionally using "iscsi_firmware" "rd.iscsi.firmware" to determine if the system is iscsi boot, because dracut can only handle this case.
Along this patch, I add the infrastructure of determine iBFT, but it's not complete yet. Mark the part as "FIXME". Once customer is asking or maybe I get hold of iBFT box, I can start working on it.
Signed-off-by: WANG Chao chaowang@redhat.com
dracut-module-setup.sh | 77 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index dcebc47..9616866 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -411,7 +411,78 @@ kdump_get_iscsi_initiator() { return 1 }
-# No ibft handling yet. +# Determine hardware iscsi by an iface's transport class. +# If transport class is tcp, it's software iscsi. +# If it's be2iscsi, bnx2i, cxgb3i, cxgb4i, it's hardware iscsi. +kdump_is_iscsi_hw_session() {
- if [ "$(kdump_iscsi_get_rec_val $1 "iface.transport_name")" = tcp ]; then
return 1
- fi
- return 0
+}
+# FIXME: determine iBFT +kdump_is_iscsi_ibft_session() {
- return 1
+}
+# kernel cmdline must contain these either of the following arguments +# for booting off hardware iSCSI: +# rd.iscsi.firmware[=1], iscsi_firmware +kdump_is_iscsi_hw_cmdline() {
How about name it as kdump_check_iscsi_hw_cmdline? Have the same concern about above 2 functions.
- local cmdline
- cmdline="$(cat /proc/cmdline)"
- for arg in $cmdline; do
case "$arg" in
"rd.iscsi.firmware" |\
"rd.iscsi.firmware=1" |\
"iscsi_firmware")
return 0
;;
esac
- done
- return 1
+}
+# kernel cmdline must contain these either of the following arguments +# for booting off iBFT: +# rd.iscsi.ibft[=1], ip=ibft +kdump_is_iscsi_ibft_cmdline() {
ditto.
- local cmdline
- cmdline="$(cat /proc/cmdline)"
- for arg in $cmdline; do
case "$arg" in
"rd.iscsi.ibft" |\
"rd.iscsi.ibft=1" |\
"ip=ibft")
return 0
;;
esac
- done
- return 1
+}
+# 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
+}
kdump_setup_iscsi_device() { local path=$1 local tgt_name; local tgt_ipaddr; @@ -434,6 +505,10 @@ kdump_setup_iscsi_device() { return 1 fi
Could you add the reason why we needn't take care of hw iscsi and ibft cases in kdump? This can make code more readable.
- 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")
Besides above several small concerns, this patch looks good to me.
Thanks, Chao.
-- 1.9.3
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
I lost the original mail, So reply it following this mail. Chao's patch look good for me.
On 11/03/14 at 10:33am, Dave Young wrote:
Hi,
Well done, thanks Chao.
Vivek/Bao/Minfei, could you review the patch as well?
On 10/28/14 at 06:43pm, WANG Chao wrote:
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).
kdump_setup_iscsi_device() { local path=$1 local tgt_name; local tgt_ipaddr; @@ -434,6 +505,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
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On 11/03/14 at 11:09am, WANG Chao wrote:
On 11/03/14 at 10:33am, Dave Young wrote:
Hi,
Well done, thanks Chao.
Vivek/Bao/Minfei, could you review the patch as well?
On 10/28/14 at 06:43pm, WANG Chao wrote:
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.
I read some iscsi code and I also talked with storage QE. It's confirmed that software iscsi will use "tcp" transport class while hardware iscsi will use like "be2iscsi" "bnx2i" transport class. It's ok to use the transport name of an iface of a scsi session to determine hardware iscsi or not. Additionally using "iscsi_firmware" "rd.iscsi.firmware" to determine if the system is iscsi boot, because dracut can only handle this case.
Along this patch, I add the infrastructure of determine iBFT, but it's not complete yet. Mark the part as "FIXME". Once customer is asking or maybe I get hold of iBFT box, I can start working on it.
For non-root hwiscsi there's no kernel cmdline, you can put it in todo list We can support root device firstly and see if it works well.
Yes, that's TODO and nice-to-have. My concern is that in 2nd kernel, not all hardware/driver works as fine as it does in 1st kernel. I've heard a few cases that certain driver won't work at 2nd kernel. I found one bug myself:
https://bugzilla.redhat.com/show_bug.cgi?id=1158014 [kdump] [be2iscsi]: IP: [<ffffffffa00cf700>] hwi_get_async_handle.isra.23.constprop.39+0x90/0x1d0 [be2iscsi]
So I think it can be safer to use iscsi_tcp (software driver, no offload) instead of using hardware associated offload driver. What do you think?
I think we can open bugs in case such issues. Just what we did for drm module you know nvidia card does not work well.
Agree that we can enable root device support as the first step. BTW can you update documentation in the patch?
[..]
+# kernel cmdline must contain these either of the following arguments +# for booting off hardware iSCSI: +# rd.iscsi.firmware[=1], iscsi_firmware +kdump_is_iscsi_hw_cmdline() {
- local cmdline
- cmdline="$(cat /proc/cmdline)"
- for arg in $cmdline; do
case "$arg" in
"rd.iscsi.firmware" |\
"rd.iscsi.firmware=1" |\
"iscsi_firmware")
dracut.cmdline manpage shows below: iscsi_firmware rd.iscsi.firmware=0
So looks like iscsi_firmware == rd.iscsi.firmware=0
That's a documentation issue in dracut. iscsi_firmware actually is deprecated by rd.iscsi.firmware=1. You can send a patch to Harald to fix it.
Sure, here is a patch to fix the manpage: http://rss.gmane.org/messages/excerpts/gmane.linux.kernel.initramfs
On 11/03/14 at 01:17pm, Dave Young wrote:
On 11/03/14 at 11:09am, WANG Chao wrote:
On 11/03/14 at 10:33am, Dave Young wrote:
Hi,
Well done, thanks Chao.
Vivek/Bao/Minfei, could you review the patch as well?
On 10/28/14 at 06:43pm, WANG Chao wrote:
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.
I read some iscsi code and I also talked with storage QE. It's confirmed that software iscsi will use "tcp" transport class while hardware iscsi will use like "be2iscsi" "bnx2i" transport class. It's ok to use the transport name of an iface of a scsi session to determine hardware iscsi or not. Additionally using "iscsi_firmware" "rd.iscsi.firmware" to determine if the system is iscsi boot, because dracut can only handle this case.
Along this patch, I add the infrastructure of determine iBFT, but it's not complete yet. Mark the part as "FIXME". Once customer is asking or maybe I get hold of iBFT box, I can start working on it.
For non-root hwiscsi there's no kernel cmdline, you can put it in todo list We can support root device firstly and see if it works well.
Yes, that's TODO and nice-to-have. My concern is that in 2nd kernel, not all hardware/driver works as fine as it does in 1st kernel. I've heard a few cases that certain driver won't work at 2nd kernel. I found one bug myself:
https://bugzilla.redhat.com/show_bug.cgi?id=1158014 [kdump] [be2iscsi]: IP: [<ffffffffa00cf700>] hwi_get_async_handle.isra.23.constprop.39+0x90/0x1d0 [be2iscsi]
So I think it can be safer to use iscsi_tcp (software driver, no offload) instead of using hardware associated offload driver. What do you think?
I think we can open bugs in case such issues. Just what we did for drm module you know nvidia card does not work well.
Agree that we can enable root device support as the first step. BTW can you update documentation in the patch?
What documentation?
Agree that we can enable root device support as the first step. BTW can you update documentation in the patch?
What documentation?
Probably in kdump howto in our tree about the support status and todos. A standalone patch is also good because it seems we did not add the support list in Fedora tree.
On 11/03/14 at 03:46pm, Dave Young wrote:
Agree that we can enable root device support as the first step. BTW can you update documentation in the patch?
What documentation?
Probably in kdump howto in our tree about the support status and todos. A standalone patch is also good because it seems we did not add the support list in Fedora tree.
I'd not add this until QA approves this one.
On 11/03/14 at 03:52pm, WANG Chao wrote:
On 11/03/14 at 03:46pm, Dave Young wrote:
Agree that we can enable root device support as the first step. BTW can you update documentation in the patch?
What documentation?
Probably in kdump howto in our tree about the support status and todos. A standalone patch is also good because it seems we did not add the support list in Fedora tree.
I'd not add this until QA approves this one.
Sure, that's fine. Just keep it in mind.
On Tue, Oct 28, 2014 at 06:43:39PM +0800, WANG Chao wrote:
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.
I read some iscsi code and I also talked with storage QE. It's confirmed that software iscsi will use "tcp" transport class while hardware iscsi will use like "be2iscsi" "bnx2i" transport class. It's ok to use the transport name of an iface of a scsi session to determine hardware iscsi or not. Additionally using "iscsi_firmware" "rd.iscsi.firmware" to determine if the system is iscsi boot, because dracut can only handle this case.
Along this patch, I add the infrastructure of determine iBFT, but it's not complete yet. Mark the part as "FIXME". Once customer is asking or maybe I get hold of iBFT box, I can start working on it.
Signed-off-by: WANG Chao chaowang@redhat.com
Chao,
I am wondering that why do iscsi module of dracut should not do the work of setting up iscsi devices.
Our general kdump theme so far has been (at least in terms of block devices) that we pass in top level fs information to dracut and then dracut automatically figures out the device stack beneath it and pull in all the required dependencies.
So my general impression is we should do this work in two steps.
- First move all/most of the iscsi logic from dracut-module-setup.sh to dracut iscsi module.
- And then modify dracut iscsi module to do also support hardware and ibft iscsi connections.
What do you think?
Thanks Vivek
dracut-module-setup.sh | 77 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index dcebc47..9616866 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -411,7 +411,78 @@ kdump_get_iscsi_initiator() { return 1 }
-# No ibft handling yet. +# Determine hardware iscsi by an iface's transport class. +# If transport class is tcp, it's software iscsi. +# If it's be2iscsi, bnx2i, cxgb3i, cxgb4i, it's hardware iscsi. +kdump_is_iscsi_hw_session() {
- if [ "$(kdump_iscsi_get_rec_val $1 "iface.transport_name")" = tcp ]; then
return 1
- fi
- return 0
+}
+# FIXME: determine iBFT +kdump_is_iscsi_ibft_session() {
- return 1
+}
+# kernel cmdline must contain these either of the following arguments +# for booting off hardware iSCSI: +# rd.iscsi.firmware[=1], iscsi_firmware +kdump_is_iscsi_hw_cmdline() {
- local cmdline
- cmdline="$(cat /proc/cmdline)"
- for arg in $cmdline; do
case "$arg" in
"rd.iscsi.firmware" |\
"rd.iscsi.firmware=1" |\
"iscsi_firmware")
return 0
;;
esac
- done
- return 1
+}
+# kernel cmdline must contain these either of the following arguments +# for booting off iBFT: +# rd.iscsi.ibft[=1], ip=ibft +kdump_is_iscsi_ibft_cmdline() {
- local cmdline
- cmdline="$(cat /proc/cmdline)"
- for arg in $cmdline; do
case "$arg" in
"rd.iscsi.ibft" |\
"rd.iscsi.ibft=1" |\
"ip=ibft")
return 0
;;
esac
- done
- return 1
+}
+# 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
+}
kdump_setup_iscsi_device() { local path=$1 local tgt_name; local tgt_ipaddr; @@ -434,6 +505,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
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec