[stgt] New portal feature breaks systems without IPv6 in kernel

Novgorodov Igor igor at novg.net
Wed May 11 10:03:45 CEST 2011


Thanks, i've looked for an option to specify a portals in
command line, but ./tgtd -h gave me nothing useful :)

"--iscsi portal=" is what i really need.

What for the patch, i think that iSCSI systems are primarily used
in closed environments, where ip address problems are not a concern.
So ipv6 support, at least for now, should be optional.

Or there should be more verbose explaination why tgtd cannot start, so 
the user won't have to dig into the code like me to find the
root of problem...

Other solution may be to add a flag to the Makefile to build with or 
without IPV6.

11.05.2011 11:06, ronnie sahlberg wrote:
> Tomo, list, igor
>
> Please find attached a patch that allows tgtd to start even if it can
> not bind to the default IPv6 wildcard.
>
> By default, if no portal is specified, tgtd will try to bind to both
> IPv6 and IPv4 wildcard.
> This caused the start to fail with an error on systems with no IPv6 available.
>
>
>
> Note that even on those systrems that lack IPv6 support, tgtd can be
> used and start, just that it must be started with deliberate
> non-support for IPv6 by ONLY specifying an IPv4 portal,   example
>
> tgtd --iscsi portal=0.0.0.0:3260
>
> This allows tgtd to run on those systems that are non-IPv6 aware even
> without this patch.
>
>
> Since being from AsiaPac, where ARIN did run out of IPv4 addresses a
> while back,  I dont know if I want this patch applied.
> My portal stuff did cause a regression, but on the other hand I see
> good reason too why forcing IPv4 users to become aware.
> And they can use a manual override, like specifying IPv4 portal
> manually on the command line.
>
>
> Tomo, use your judgement. The patch is applied, to fix a regression. I
> can easily see reasons both why to apply it and also why not to apply
> it.
>
>
> I think it is about time that all software became IPv6 mandatory by
> default,  so maybe this bug I introduced was subconciously deliberate.
> :-)
>
>
>
> regards
> ronnie sahlberg
>
>
> On Wed, May 11, 2011 at 7:30 AM, ronnie sahlberg
> <ronniesahlberg at gmail.com>  wrote:
>> My bad.
>>
>> Ill provide a patch later today.
>>
>>
>> regards
>> ronnie sahlberg
>>
>>
>> On Tue, May 10, 2011 at 10:34 PM, Novgorodov Igor<igor at novg.net>  wrote:
>>> I have a gentoo server working as a target, and latest 1.0.16 / GIT tgtd
>>> gives me "No available low level driver",
>>> while 1.0.15 works fine. After some tracing i've found out that by default
>>> it creates "0::0" ipv6 portal along with
>>> default 0.0.0.0, and when it fails to bind to v6 socket, it dies.
>>>
>>> So, for now i've just removed the v6 wildcard portal, but we should have
>>> some checks that the current kernel
>>> actually was built with ipv6 before attempting to try it...
>>>
>>>   # diff -c iscsi_tcp.c.orig iscsi_tcp.c
>>> *** iscsi_tcp.c.orig    Tue May 10 16:21:39 2011
>>> --- iscsi_tcp.c Tue May 10 16:21:43 2011
>>> ***************
>>> *** 306,312 ****
>>>            for ipv4 and ipv6
>>>         */
>>>         if (list_empty(&iscsi_portals_list)) {
>>> !               iscsi_add_portal("0::0", 0, 1, 0);
>>>                 iscsi_add_portal("0.0.0.0", 0, 1, 0);
>>>         }
>>>
>>> --- 306,312 ----
>>>            for ipv4 and ipv6
>>>         */
>>>         if (list_empty(&iscsi_portals_list)) {
>>> ! //            iscsi_add_portal("0::0", 0, 1, 0);
>>>                 iscsi_add_portal("0.0.0.0", 0, 1, 0);
>>>         }
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe stgt" in
>>> the body of a message to majordomo at vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list