Re: iscsi_sysfs_read_iface

2011-07-27 Thread Ravi Anand
On Jul 26, 2011, at 11:34 PM, Hannes Reinecke wrote:
> On 07/26/2011 09:44 PM, Mike Christie wrote:
>> On 07/26/2011 01:38 AM, Hannes Reinecke wrote:
>>> Hi Eddie,
>>>
>>> you beat me to it ...
>>>
>>> On 07/26/2011 02:28 AM, Eddie Wai wrote:
 Hello Mike,

 The following snippet from the 39d4ceb04f051c208ae7509d268a3871ffa194c5
 commit is preventing bnx2i from being able to offload when connecting
 through the iscsi_sysfs_get_hostinfo_by_host_no code path where the
 session argument == NULL.  The initiatorname sysfs inquiry failed but
 this is expected since it does not exist in the iscsi_host for bnx2i.

 Perhaps the error return code should only be propagated upward when
 session != NULL specifically for hbas like qla4xxx?

 Thanks,
 Eddie

 - 8<   - 8<   -
 @@ -527,7 +528,10 @@ static int iscsi_sysfs_read_iface(struct iface_rec
 *iface, int host_no,
iface_str(iface));
  }
  }
 -   return ret;
 +   if (ret)
 +   return ISCSI_ERR_SYSFS_LOOKUP;
 +   else
 +   return 0;
   }
 - 8<   - 8<   -
>>> Actually, this is the patch I have:
>>>
>>> diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
>>> index e82fe80..145816d 100644
>>> --- a/usr/iscsi_sysfs.c
>>> +++ b/usr/iscsi_sysfs.c
>>> @@ -489,7 +489,7 @@ static int iscsi_sysfs_read_iface(struct iface_rec
>>> *iface, int host_no,
>>> if (ret) {
>>> ret = sysfs_get_str(id, ISCSI_HOST_SUBSYS, "initiatorname",
>>> iface->iname, sizeof(iface->iname));
>>> -   if (ret)
>>> +   if (ret) {
>>> /*
>>>  * default iname is picked up later from
>>>  * initiatorname.iscsi if software/partial-offload.
>>> @@ -499,6 +499,8 @@ static int iscsi_sysfs_read_iface(struct iface_rec
>>> *iface, int host_no,
>>>  */
>>> log_debug(7, "Could not read initiatorname for "
>>>   "host%d\n", host_no);
>>> +   ret = 0;
>>> +   }
>>> }
>>>
>>> /*
>>>
>>> (Well, of course it got line-wrapped, but should get you the idea).
>>>
>>> I'll be sending the proper patch to the mailing-list shortly.
>>> But yes, that is a real issue.
>>
>> Yeah, this is right. That is the behavior we had before. I can just fix
>> this up and merge it if there were no other changes needed.
> Not in this area, no.
>
> I've got some minor patches to the SUSE init script but they still
> need further testing.
>
> And actually I'm working on an 'iscsi_offload' scripts which
> configures the interface definitions for the various offload
> engines. If there is enough interest maybe we should include it in
> the open-iscsi tarball.
>
I think this is a good idea.

Ravi



This message and any attached documents contain information from QLogic 
Corporation or its wholly-owned subsidiaries that may be confidential. If you 
are not the intended recipient, you may not read, copy, distribute, or use this 
information. If you have received this transmission in error, please notify the 
sender immediately by reply e-mail and then delete this message.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@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: iscsi_sysfs_read_iface

2011-07-27 Thread Mike Christie
On 07/27/2011 01:34 AM, Hannes Reinecke wrote:
> And actually I'm working on an 'iscsi_offload' scripts which configures
> the interface definitions for the various offload engines. If there is
> enough interest maybe we should include it in the open-iscsi tarball.
> 

Ok my me.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@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: open-iscsi issue

2011-07-27 Thread Farhan Ahmed
Hi Mike,

Have you got chance to look into this issue?

Farhan
On Jul 26, 2011 12:54 PM, "Farhan Ahmed"  wrote:
> Hi Mike,
>
> I installed CentOS 6.0 and git code worked well. I can perform the
> discovery now but iscsiadm cant login
>
> eth2 is down from the Switch
>
> [root@nfs02 ~]# ping 192.168.42.190
> PING 192.168.42.190 (192.168.42.190) 56(84) bytes of data.
> ^C
> --- 192.168.42.190 ping statistics ---
> 3 packets transmitted, 0 received, 100% packet loss, time 2930ms
>
> [root@nfs02 ~]# ping -I eth3 192.168.42.190
> PING 192.168.42.190 (192.168.42.190) from 192.168.42.71 eth3: 56(84)
> bytes of data.
> 64 bytes from 192.168.42.190: icmp_seq=1 ttl=255 time=0.108 ms
> 64 bytes from 192.168.42.190: icmp_seq=2 ttl=255 time=0.107 ms
> ^C
> --- 192.168.42.190 ping statistics ---
> 2 packets transmitted, 2 received, 0% packet loss, time 1311ms
> rtt min/avg/max/mdev = 0.107/0.107/0.108/0.010 ms
>
> [root@nfs02 ~]# iscsiadm -m discovery -p 192.168.42.190 -t st -I eth3
> 192.168.42.190:3260,1 iqn.2001-05.com.equallogic:0-8a0906-
> f0a1ed402-1f40012bba54e28b-nfs02-bond
>
>
> [root@nfs02 ~]# iscsiadm -m node -T iqn.2001-05.com.equallogic:
> 0-8a0906-f0a1ed402-1f40012bba54e28b-nfs02-bond -I eth3 -l
> Logging in to [iface: eth3, target: iqn.2001-05.com.equallogic:
> 0-8a0906-f0a1ed402-1f40012bba54e28b-nfs02-bond, portal:
> 192.168.42.190,3260] (multiple)
> iscsiadm: Could not login to [iface: eth3, target: iqn.
> 2001-05.com.equallogic:0-8a0906-f0a1ed402-1f40012bba54e28b-nfs02-bond,
> portal: 192.168.42.190,3260].
> iscsiadm: initiator reported error (8 - connection timed out)
> iscsiadm: Could not log into all portals
>
>
> Could you please advise? Secondly if we reboot our box while "eth2 is
> down from switch" still iscsiadm cant login
>
> Regards,
>
> Farhan
>
>
>
>
>
> On Jul 24, 6:20 pm, Mike Christie  wrote:
>> On 07/24/2011 12:02 AM, Farhan Ahmed wrote:
>>
>> > It is centos 5.6. I tried to compile kernel without DEPRECATED option
>> > but kernel didnt boot and threw errors so I had to compile it again
>> > with DEPRECATED support, I cant udnerstand why SYSFS had no issue with
>> > the default version of open-iscsi. We can upgrade CENTOS from 5.6 to
>> > 6.0. May I ask when are you releasing new version of open-scsi that
>> > fix this routing issue?
>>
>> About Aug 15th.
>
> --
> You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
> To post to this group, send email to open-iscsi@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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@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: open-iscsi issue

2011-07-27 Thread Mike Christie
On 07/27/2011 05:18 PM, Farhan Ahmed wrote:
> Hi Mike,
> 
> Have you got chance to look into this issue?
> 

I have not.  You tried changing the rp_filter values right?

Run iscsid by hand in debug mode

/etc/init.d/iscsid stop
iscsid -d 8 -f all

iscsiadm -m node . -l

Send iscsid output.

Also send /var/log/messages output. Also run tcpdump to check that the
tcp ip SYN is going through the right interface.


> Farhan
> 
> On Jul 26, 2011 12:54 PM, "Farhan Ahmed"  > wrote:
>> Hi Mike,
>>
>> I installed CentOS 6.0 and git code worked well. I can perform the
>> discovery now but iscsiadm cant login
>>
>> eth2 is down from the Switch
>>
>> [root@nfs02 ~]# ping 192.168.42.190
>> PING 192.168.42.190 (192.168.42.190) 56(84) bytes of data.
>> ^C
>> --- 192.168.42.190 ping statistics ---
>> 3 packets transmitted, 0 received, 100% packet loss, time 2930ms
>>
>> [root@nfs02 ~]# ping -I eth3 192.168.42.190
>> PING 192.168.42.190 (192.168.42.190) from 192.168.42.71 eth3: 56(84)
>> bytes of data.
>> 64 bytes from 192.168.42.190 : icmp_seq=1
> ttl=255 time=0.108 ms
>> 64 bytes from 192.168.42.190 : icmp_seq=2
> ttl=255 time=0.107 ms
>> ^C
>> --- 192.168.42.190 ping statistics ---
>> 2 packets transmitted, 2 received, 0% packet loss, time 1311ms
>> rtt min/avg/max/mdev = 0.107/0.107/0.108/0.010 ms
>>
>> [root@nfs02 ~]# iscsiadm -m discovery -p 192.168.42.190 -t st -I eth3
>> 192.168.42.190:3260 ,1
> iqn.2001-05.com.equallogic:0-8a0906-
>> f0a1ed402-1f40012bba54e28b-nfs02-bond
>>
>>
>> [root@nfs02 ~]# iscsiadm -m node -T iqn.2001-05.com.equallogic:
>> 0-8a0906-f0a1ed402-1f40012bba54e28b-nfs02-bond -I eth3 -l
>> Logging in to [iface: eth3, target: iqn.2001-05.com.equallogic:
>> 0-8a0906-f0a1ed402-1f40012bba54e28b-nfs02-bond, portal:
>> 192.168.42.190,3260] (multiple)
>> iscsiadm: Could not login to [iface: eth3, target: iqn.
>> 2001-05.com.equallogic:0-8a0906-f0a1ed402-1f40012bba54e28b-nfs02-bond,
>> portal: 192.168.42.190,3260].
>> iscsiadm: initiator reported error (8 - connection timed out)
>> iscsiadm: Could not log into all portals
>>
>>
>> Could you please advise? Secondly if we reboot our box while "eth2 is
>> down from switch" still iscsiadm cant login
>>
>> Regards,
>>
>> Farhan
>>
>>
>>
>>
>>
>> On Jul 24, 6:20 pm, Mike Christie  > wrote:
>>> On 07/24/2011 12:02 AM, Farhan Ahmed wrote:
>>>
>>> > It is centos 5.6. I tried to compile kernel without DEPRECATED option
>>> > but kernel didnt boot and threw errors so I had to compile it again
>>> > with DEPRECATED support, I cant udnerstand why SYSFS had no issue with
>>> > the default version of open-iscsi. We can upgrade CENTOS from 5.6 to
>>> > 6.0. May I ask when are you releasing new version of open-scsi that
>>> > fix this routing issue?
>>>
>>> About Aug 15th.
>>
>> --
>> You received this message because you are subscribed to the Google
> Groups "open-iscsi" group.
>> To post to this group, send email to open-iscsi@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.
>>
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "open-iscsi" group.
> To post to this group, send email to open-iscsi@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.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@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: open-iscsi issue

2011-07-27 Thread Farhan Ahmed
Thanks Mike, Yes I have set right kernel values of rp_filter, please find
the attached file which includes debug output,tcpdump and command output.
Discovery works fine for eth3 but iscsiadm cant login though. I can see the
packets are coming in/out at right interface eth3

Regards,

Farhan

On Thu, Jul 28, 2011 at 8:31 AM, Mike Christie  wrote:

> On 07/27/2011 05:18 PM, Farhan Ahmed wrote:
> > Hi Mike,
> >
> > Have you got chance to look into this issue?
> >
>
> I have not.  You tried changing the rp_filter values right?
>
> Run iscsid by hand in debug mode
>
> /etc/init.d/iscsid stop
> iscsid -d 8 -f all
>
> iscsiadm -m node . -l
>
> Send iscsid output.
>
> Also send /var/log/messages output. Also run tcpdump to check that the
> tcp ip SYN is going through the right interface.
>
>
> > Farhan
> >
> > On Jul 26, 2011 12:54 PM, "Farhan Ahmed"  > > wrote:
> >> Hi Mike,
> >>
> >> I installed CentOS 6.0 and git code worked well. I can perform the
> >> discovery now but iscsiadm cant login
> >>
> >> eth2 is down from the Switch
> >>
> >> [root@nfs02 ~]# ping 192.168.42.190
> >> PING 192.168.42.190 (192.168.42.190) 56(84) bytes of data.
> >> ^C
> >> --- 192.168.42.190 ping statistics ---
> >> 3 packets transmitted, 0 received, 100% packet loss, time 2930ms
> >>
> >> [root@nfs02 ~]# ping -I eth3 192.168.42.190
> >> PING 192.168.42.190 (192.168.42.190) from 192.168.42.71 eth3: 56(84)
> >> bytes of data.
> >> 64 bytes from 192.168.42.190 : icmp_seq=1
> > ttl=255 time=0.108 ms
> >> 64 bytes from 192.168.42.190 : icmp_seq=2
> > ttl=255 time=0.107 ms
> >> ^C
> >> --- 192.168.42.190 ping statistics ---
> >> 2 packets transmitted, 2 received, 0% packet loss, time 1311ms
> >> rtt min/avg/max/mdev = 0.107/0.107/0.108/0.010 ms
> >>
> >> [root@nfs02 ~]# iscsiadm -m discovery -p 192.168.42.190 -t st -I eth3
> >> 192.168.42.190:3260 ,1
> > iqn.2001-05.com.equallogic:0-8a0906-
> >> f0a1ed402-1f40012bba54e28b-nfs02-bond
> >>
> >>
> >> [root@nfs02 ~]# iscsiadm -m node -T iqn.2001-05.com.equallogic:
> >> 0-8a0906-f0a1ed402-1f40012bba54e28b-nfs02-bond -I eth3 -l
> >> Logging in to [iface: eth3, target: iqn.2001-05.com.equallogic:
> >> 0-8a0906-f0a1ed402-1f40012bba54e28b-nfs02-bond, portal:
> >> 192.168.42.190,3260] (multiple)
> >> iscsiadm: Could not login to [iface: eth3, target: iqn.
> >> 2001-05.com.equallogic:0-8a0906-f0a1ed402-1f40012bba54e28b-nfs02-bond,
> >> portal: 192.168.42.190,3260].
> >> iscsiadm: initiator reported error (8 - connection timed out)
> >> iscsiadm: Could not log into all portals
> >>
> >>
> >> Could you please advise? Secondly if we reboot our box while "eth2 is
> >> down from switch" still iscsiadm cant login
> >>
> >> Regards,
> >>
> >> Farhan
> >>
> >>
> >>
> >>
> >>
> >> On Jul 24, 6:20 pm, Mike Christie  > > wrote:
> >>> On 07/24/2011 12:02 AM, Farhan Ahmed wrote:
> >>>
> >>> > It is centos 5.6. I tried to compile kernel without DEPRECATED option
> >>> > but kernel didnt boot and threw errors so I had to compile it again
> >>> > with DEPRECATED support, I cant udnerstand why SYSFS had no issue
> with
> >>> > the default version of open-iscsi. We can upgrade CENTOS from 5.6 to
> >>> > 6.0. May I ask when are you releasing new version of open-scsi that
> >>> > fix this routing issue?
> >>>
> >>> About Aug 15th.
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> > Groups "open-iscsi" group.
> >> To post to this group, send email to open-iscsi@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.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "open-iscsi" group.
> > To post to this group, send email to open-iscsi@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@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.

iscsid -d 8 -f all


iscsid: sysfs_init: sysfs_path='/sys'

iscsid: sysfs_attr_get_value: open '/module/scsi_transport_iscsi'/'version'

iscsid: sysfs_attr_get_value: new uncached attribute 
'/sys/module/scsi_transport_iscsi/version'

iscsid: sysfs_attr_get_value: add to cache 
'/sys/module/scsi_transport_iscsi/version'

iscsid: sysfs_attr_get_value: cache '/sys/module/scsi_transp