Bug 1011075 - RFE: Add option to configure -d [0..8] on iscsiadm
Summary: RFE: Add option to configure -d [0..8] on iscsiadm
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: RFEs
Version: unspecified
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
: 3.4.0
Assignee: Nir Soffer
QA Contact: yeylon@redhat.com
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-23 15:07 UTC by Allon Mureinik
Modified: 2020-05-20 23:38 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-28 07:39:31 UTC
oVirt Team: Storage
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 20338 0 None ABANDONED iscsiadm: Add debug level option 2020-05-20 23:32:49 UTC

Description Allon Mureinik 2013-09-23 15:07:58 UTC
Description of problem:
VDSM uses iscdiadm to perform iSCSI operations which are often complicated to debug.
iscsiadm offers a -d (--debug) parameter on all its commands which adds debug information to the command's output, which may be useful to redirect to VDSM's log.

This could probably be added in iscsiadm.py in the _runCmd function, where the value of -d is obtained from some external conf. file.

Comment 1 Eduardo Warszawski 2013-10-24 13:41:40 UTC
The whole idea this RFE is questionable, being iscsiadm errors actually logged in vdsm.log and there is no need for logging iscasiadm possitive flows in vdsm.logs.

Dumping big chunks of unrelated data on the vdsm log will make vdsm.log worse.

Comment 2 Lev Veyde 2013-10-24 14:13:45 UTC
(In reply to Eduardo Warszawski from comment #1)
> The whole idea this RFE is questionable, being iscsiadm errors actually
> logged in vdsm.log and there is no need for logging iscasiadm possitive
> flows in vdsm.logs.
> 
> Dumping big chunks of unrelated data on the vdsm log will make vdsm.log
> worse.

But without this debugging information it makes virtually impossible to debug any iscsiadm related issues, like the issue of configuration that becomes corrupted, and prevents the machine from performing any other iSCSI related tasks, until the corrupted DB is removed.

The issue is we can't really know at which stage the configuration became corrupted, unless we'll be able to collect and analyze this debug information.

If you are concerned with vdsm.log being filled up with iscsiadm debug info, then there is an option to store it in a separate log file i.e. iscsiadm.log, but additional timestamping headers will have to be added before each debug dump.

Comment 3 Nir Soffer 2013-10-24 21:59:21 UTC
Patch is available here: http://gerrit.ovirt.org/#/c/20338/

Comment 4 Nir Soffer 2013-10-25 12:28:07 UTC
Seems that this RFE needs more discussion; waiting for maintainers aproval on this RFE.

Comment 5 Dan Kenigsberg 2013-10-25 19:56:43 UTC
(In reply to Lev Veyde from comment #2)

> The issue is we can't really know at which stage the configuration became
> corrupted, unless we'll be able to collect and analyze this debug
> information.

Lev, could you provide more information about the corrupted config issue? Is there a BZ on that? If we need iscsiadm's debug info for a specific research case, we can apply the suggested (or simpler) patch to the machine(s) in question, or change /usr/sbin/iscsiadm to a script with `/usr/sbin/iscsiadm -d 8 $*`.

Comment 6 Lev Veyde 2013-10-27 08:47:10 UTC
(In reply to Dan Kenigsberg from comment #5)
> (In reply to Lev Veyde from comment #2)
> 
> > The issue is we can't really know at which stage the configuration became
> > corrupted, unless we'll be able to collect and analyze this debug
> > information.
> 
> Lev, could you provide more information about the corrupted config issue? Is
> there a BZ on that? If we need iscsiadm's debug info for a specific research
> case, we can apply the suggested (or simpler) patch to the machine(s) in
> question, or change /usr/sbin/iscsiadm to a script with `/usr/sbin/iscsiadm
> -d 8 $*`.

Hi Dan,

BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=915747

We have this issue randomly appearing on all host servers that participate in CI.
As already mentioned in that BZ we implemented a fix that simply erases the empty files, since without debugging info there was no way for us to try and find the source of the issue.

Our guess is that some data iscsiadm receives from the SAN target causes it to crash while creating the config entry, thus leaving it in corrupted state (zero sized file).

I agree that we can potentially add some code just to our env., but that will probably include a patch for VDSM which will have to be included in each VDSM build anyway and more importantly some customer(s) may potentially run into the same issue as us, and the already implemented facility will ease the debugging and troubleshooting for GSS. A simple config. switch may be implemented to turn this logging on and off.

Comment 7 Dan Kenigsberg 2013-10-28 01:12:08 UTC
I am not as dramatic as Saggi: first use something like

mv /usr/bin/iscsiadm /usr/bin/iscsiadm_orig
cat << EOF
#!/bin/sh
exec /usr/bin/iscsiadm_orig -d 8 "$@"
EOF

to find forensics for bug 915747. If it turns up useful, we can take it into Vdsm. If not - it's dead code.

Comment 8 Allon Mureinik 2013-10-28 07:39:31 UTC
Nacked by u/s maintainers.
If Dan's suggestion from comment 7 ever proves useful, we can reopen this.


Note You need to log in before you can comment on or make changes to this bug.