debug version on SUSE 11.1

2010-01-13 Thread annayu
Hola,

I use openSUSE 11.1 on virtual machine and suddenly I faced the
problem which requires me to look throw the open-iscsi initiator debug
output. Please tell me which version of open-iscsi should I use and
the main question -- how to compile and install it. Unfortunately all
my attempts lead to the error:

make -C kernel
cat: /lib/modules/2.6.27.7-9-pae/build/Makefile: No such file or
directory
make[1]: Entering directory `/home/annyu/Documents/open-
iscsi-2.0-870.3.debug/kernel'
make[1]: *** No rule to make target `linux_2_6_', needed by
`kernel_check'.  Stop.
make[1]: Leaving directory `/home/annyu/Documents/open-
iscsi-2.0-870.3.debug/kernel'
make: *** [all] Error 2
-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-is...@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.




Re: Suggestion for new logging mechanism in open-iscsi

2010-01-13 Thread Erez Zilber
On Wed, Dec 16, 2009 at 5:31 PM, Erez Zilber  wrote:
> On Wed, Dec 2, 2009 at 10:55 AM, Erez Zilber  wrote:
>> I'd like to make some changes in the logging in open-iscsi. The
>> current status is as follows:
>>
>> kernel modules:
>>
>> * We use iscsi_cls_session_printk & iscsi_cls_conn_printk in
>> scsi_transport_iscsi.c. They are sometimes wrapped by macros (e.g.
>> ISCSI_DBG_TRANS_SESSION). These macros use KERN_INFO and are
>> controlled by module parameters.
>>
>> * We use iscsi_session_printk & iscsi_conn_printk for the rest of the
>> kernel code.These macros wrap iscsi_cls_session_printk &
>> iscsi_cls_conn_printk accordingly. They are sometimes wrapped by
>> macros (e.g. ISCSI_SW_TCP_DBG). These macros use KERN_INFO and are
>> controlled by module parameters.
>>
>> * We sometimes use printk calls.
>>
>> userspace:
>>
>> We use log_warning, log_error & log_debug. They depend on the logging
>> level that we use (0-8). if (log_level > level), the log is sent to
>> syslog with the appropriate log level (LOG_WARNING/LOG_ERR/LOG_DEBUG).
>>
>> My motivation: with the current logging mechanism, if an error occurs,
>> I'm unable to tell exactly what happened. The default logging level is
>> too low. Increasing it affects performance. Another problem is that
>> open-iscsi has too many logging mechanisms.
>>
>> I suggest that:
>> 1. For kernel modules, we will have 'events' (or any better name that
>> you suggest) like 'session', 'conn', 'eh', 'cmd' etc. For each event,
>> we will have a logging level. For example, the user may want to set
>> the 'conn' event to 'DEBUG'. It means that we will print all conn
>> related logs that are DEBUG and above (e.g. WARNING, ERROR).
>
> I suggest that each kernel module will have its own events. Each event
> will be represented by a module parameter (with some default value).
>
>> 2. For userspace code, we could do the same (i.e. have events and a
>> log level per event).
>
> Regarding the 'events' in userspace - we will have events A, B & C for
> iscsid and events D, E & F for iscsiadm. For each event, we will
> probably have a default logging level. The user may want to run with
> another logging level for each event. For iscsid, I suggest that we
> add this to iscsid.conf. For iscsiadm, the user will be able to do
> something like:
>
> iscsiadm -d some_level - this will set all events to 'some_level'
> iscsiadm -dE level_for_E -dF level_for_F - this will set the event 'E'
> to 'level_for_E' and the event 'F' to 'level_for_F'. The event 'D'
> will use the default logging level.
>
> Comments?
>
> Thanks,
> Erez
>

I've started working on the new logging. I've started with iscsi_tcp.
Here's a glance of the general idea. If you have comments on the
general implementation, let's discuss them now. Later, it will be much
more difficult for me.

Here it is:

Added the following code in libiscsi.h:

#define iscsi_log(log_level, dev, dbg_fmt, arg...)  \
do {\
char *log_level_str;\
switch (log_level) {\
case ISCSI_LOG_ERROR:   \
log_level_str = "ERROR";\
break;  \
case ISCSI_LOG_WARN:\
log_level_str = "WARN"; \
break;  \
case ISCSI_LOG_INFO:\
log_level_str = "INFO"; \
break;  \
case ISCSI_LOG_DEBUG:   \
log_level_str = "DEBUG";\
break;  \
case ISCSI_LOG_TRACE:   \
log_level_str = "TRACE";\
break;  \
}   \
if (log_level > ISCSI_LOG_INFO) {   \
if (dev) {  \
dev_printk(KERN_DEBUG,  \
   (struct device *)dev,\
   "%s:%d (%s) " dbg_fmt "\n",  \
   __func__, __LINE__,  \
   log_level_str, ##arg);   \
} else {\
printk(KERN_DEBU

Re: open-iscsi on SUSE 11

2010-01-13 Thread Hannes Reinecke
Stuart Little wrote:
> Hi,
>   Using open-iscsi-2.0.869-8.1  (x86_64) on a SUSE 11.0 based machine,
> connecting to an HP D2D.
> 
Is that OpenSUSE 11.0 or SLES11?

I only do _very_ limited testing on OpenSUSE, so SLES is the preferred
platform if you really want to test iSCSI.

I would recommend recompiling the latest open-iscsi code by hand for OpenSUSE.

Sorry for this, but I fear I'm slightly overloaded...

Cheers,

Hannes
-- 
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-is...@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.




Re: SLES10 SP3 x86_64 - connection2:0: detected conn error (1011)

2010-01-13 Thread Hannes Reinecke
avora wrote:
> With SLES10 SP3 x86_64,
> as soon as I start the second iscsi session2, I am very frequently
> getting the connection errors/
> I do not see this with SLES10 SP2 x86_64 on the same setup.
> 
> Dec  7 18:42:05 cdc-r710s1 kernel:  connection2:0: detected conn error
> (1011)
> Dec  7 18:42:06 cdc-r710s1 iscsid: connection2:0 is operational after
> recovery (1 attempts)
> Dec  7 18:42:06 cdc-r710s1 iscsid: Kernel reported iSCSI connection
> 2:0 error (1011) state (3)
> Dec  7 18:42:08 cdc-r710s1 kernel:  connection2:0: detected conn error
> (1011)
> 
> I have tried changing noop_out_interval and noop_out_timeout to
> 120/120 and 0/0 but did not help.
> The iscsiadm settings are same on both SP2 and SP3.
> Is there anything else that can be tried ?
> 
> # iscsiadm --mode node --targetname 
> ...
> 
> # rpm -qa | grep iscsi
> iscsitarget-0.4.17-3.4.25
> open-iscsi-2.0.868-0.6.11
> yast2-iscsi-client-2.14.47-0.4.9
> yast2-iscsi-server-2.13.26-0.3
> 
Please try with the latest update kernel. I made quite some
fixes which should help here.

cheers,

Hannes
-- 
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-is...@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.