Currently, we throw the error message at the very beginning, as a result on a pure-hardware(all-offload) iscsi machine with many iscsi partitions, we suffered from too much noise as follows: iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.1/host0/session1 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.3/host1/session2 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.1/host0/session1 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.3/host1/session2 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.1/host0/session1 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.3/host1/session2 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.1/host0/session1 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.3/host1/session2 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.1/host0/session1 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.3/host1/session2 kexec: loaded kdump kernel Starting kdump: [OK]
There's no need to know the very early error messages, we can remove the error output which is actually normal for the pure hardware iscsi.
As for unexpected errors, we kept the error outputs in the succeeding kdump_iscsi_get_rec_val() calls by not appending "2>/dev/null".
Signed-off-by: Xunlei Pang xlpang@redhat.com --- dracut-module-setup.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 59b4f04..43e3f2a 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -545,11 +545,9 @@ kdump_setup_iscsi_device() {
dinfo "Found iscsi component $1"
- # Check once before getting explicit values, so we can output a decent - # error message. - - if ! /sbin/iscsiadm -m session -r ${path} >/dev/null ; then - derror "Unable to find iscsi record for $path" + # Check once before getting explicit values, so we can bail out early, + # e.g. in case of pure-hardware(all-offload) iscsi. + if ! /sbin/iscsiadm -m session -r ${path} &>/dev/null ; then return 1 fi
On 07/24/17 at 09:31pm, Xunlei Pang wrote:
Currently, we throw the error message at the very beginning, as a result on a pure-hardware(all-offload) iscsi machine with many iscsi partitions, we suffered from too much noise as follows: iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.1/host0/session1 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.3/host1/session2 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.1/host0/session1 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.3/host1/session2 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.1/host0/session1 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.3/host1/session2 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.1/host0/session1 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.3/host1/session2 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.1/host0/session1 iscsiadm: No records found Unable to find iscsi record for /sys/devices/pci0000:00/0000:00:06.0/0000:07:00.0/0000:08:01.3/host1/session2 kexec: loaded kdump kernel Starting kdump: [OK]
There's no need to know the very early error messages, we can remove the error output which is actually normal for the pure hardware iscsi.
As for unexpected errors, we kept the error outputs in the succeeding kdump_iscsi_get_rec_val() calls by not appending "2>/dev/null".
Signed-off-by: Xunlei Pang xlpang@redhat.com
dracut-module-setup.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 59b4f04..43e3f2a 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -545,11 +545,9 @@ kdump_setup_iscsi_device() {
dinfo "Found iscsi component $1"
- # Check once before getting explicit values, so we can output a decent
- # error message.
- if ! /sbin/iscsiadm -m session -r ${path} >/dev/null ; then
derror "Unable to find iscsi record for $path"
- # Check once before getting explicit values, so we can bail out early,
- # e.g. in case of pure-hardware(all-offload) iscsi.
- if ! /sbin/iscsiadm -m session -r ${path} &>/dev/null ; then return 1 fi
-- 1.8.3.1 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Acked-by: Dave Young dyoung@redhat.com
Thanks Dave