Bug 525054 - [NetApp 5.5 bug] Error message is displayed when target port is provided during root on iSCSI installation
Summary: [NetApp 5.5 bug] Error message is displayed when target port is provided duri...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: alpha
: 5.5
Assignee: Hans de Goede
QA Contact: Alexander Todorov
URL:
Whiteboard:
Depends On:
Blocks: 533941
TreeView+ depends on / blocked
 
Reported: 2009-09-23 07:42 UTC by Tanvi
Modified: 2010-03-30 08:02 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 525118 (view as bug list)
Environment:
Last Closed: 2010-03-30 08:02:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch to parse target IP input correctly (430 bytes, patch)
2009-09-23 07:45 UTC, Tanvi
no flags Details | Diff
patch to parse target IP input correctly during text mode installation (408 bytes, patch)
2009-09-23 07:45 UTC, Tanvi
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0194 0 normal SHIPPED_LIVE anaconda bug fix and enhancement update 2010-03-29 12:24:02 UTC

Description Tanvi 2009-09-23 07:42:37 UTC
Description of problem:
During root on iSCSI installation of RHEL 5.4, an error message is displayed when target port number is provided along with the target IP. The installation happens seamlessly when an IPv4 target IP is provided without target port, but it becomes impossible to install through an IPv6 IP. 
The reason for this behavior is following code snippet of files iw/autopart_type.py and textw/partition_text.py (for text mode installation)

try:
                idx = target.rfind(":")
                if idx != -1:
                    ip = target[:idx]
                    port = target[idx:]
                else:
                    ip = target
                    port = "3260"
                network.sanityCheckIPString(ip)

Here the IP is parsed using ":" keyword. When A.B.C.D:3260 is provided as target IP, ip is initialized as "A.B.C.D" and port is initialized as ":3260" and hence the error message "invalid literal for int()::3260" pops up. When A:B:C:D:E:F:G:H (an IPv6 IP) is provided, an error message stating " A:B:C:D:E:F:G is not a valid IPv6 address." is displayed. Thus IPv6 installation is not possible.

The problem gets resolved when following change is made

port = target[idx+1:]

Version-Release number of selected component (if applicable):
anaconda-11.1.2.195

How reproducible:
Always

Steps to Reproduce:
1.Start the installation by providing the keyword linux mpath in the kernel command line
2.When prompted, provide target IP address as X.X.X.X:3260
3.The error message "invalid literal for int()::3260" will be displayed and its impossible to proceed with the installation
  
Actual results:
An error message is displayed and it becomes impossible to proceed with the installation.

Expected results:
Installation should proceed even if target port number is provided.


Additional info:

Comment 1 Tanvi 2009-09-23 07:45:00 UTC
Created attachment 362178 [details]
patch to parse target IP input correctly

Comment 2 Tanvi 2009-09-23 07:45:54 UTC
Created attachment 362179 [details]
patch to parse target IP input correctly during text mode installation

Comment 4 Hans de Goede 2009-09-29 12:49:58 UTC
Tanvi,

Thanks for the patch, which is obviously correct. I wonder if it would not be better though, to do the following:

                count = len(target.split(":"))
                if count == 2 or count == 9:
                    idx = target.rfind(":")
                    ip = target[:idx]
                    port = target[idx+1:]
                else:
                    ip = target
                    port = "3260"

This way one is not mandated to specify a port with an IPV6 address. Note I'm not sure if IPV6 iscsi works in general, but that is no reason to not try to handle things correctly here.

Comment 5 RHEL Program Management 2009-09-29 13:26:09 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Mike Christie 2009-09-29 17:32:17 UTC
(In reply to comment #4)
> This way one is not mandated to specify a port with an IPV6 address. Note I'm
> not sure if IPV6 iscsi works in general, 

It just does not support ipv6 link local addresses.

Comment 7 Tanvi 2009-10-06 11:40:38 UTC
(In reply to comment #4)
> Tanvi,
> 
> Thanks for the patch, which is obviously correct. I wonder if it would not be
> better though, to do the following:
> 
>                 count = len(target.split(":"))
>                 if count == 2 or count == 9:
>                     idx = target.rfind(":")
>                     ip = target[:idx]
>                     port = target[idx+1:]
>                 else:
>                     ip = target
>                     port = "3260"
> 
> This way one is not mandated to specify a port with an IPV6 address. Note I'm
> not sure if IPV6 iscsi works in general, but that is no reason to not try to
> handle things correctly here.  

Yes, this is definitely a better way to handle the issue.

Comment 8 Chris Ward 2009-10-13 15:34:20 UTC
@NetApp,

We need to confirm that there is commitment to test 
for the resolution of this request during the RHEL 5.5 test
phase, if it is accepted into the release. 

Please post a confirmation before Oct 16th, 2009, 
including the contact information for testing engineers.

Comment 9 Hans de Goede 2009-10-13 17:39:09 UTC
(In reply to comment #8)
> @NetApp,
> 
> We need to confirm that there is commitment to test 
> for the resolution of this request during the RHEL 5.5 test
> phase, if it is accepted into the release. 
> 
> Please post a confirmation before Oct 16th, 2009, 
> including the contact information for testing engineers.  

Note the issue at hand is trivial to reproduce, even without access to iscsi
hardware, in the partitioning type (remove linux, use freespace, use entire disk) screen press the advanced storage button, then select iscsi, then next. Then as IP fill in:
127.0.0.1:1234

You will get an error that :1234 is not a valid base 10 integer, instead you should get an error that login failed (as nothing is listening on that address).


Tanvi,

This reminds me I ended up fixing this yet a bit different then proposed, see:
http://git.fedorahosted.org/git/?p=anaconda.git;a=commitdiff;h=dfe1f3b83f40c6036beda4124f72c273f6369647

Comment 11 Tanvi 2009-10-15 06:11:02 UTC
We will be test this bug during RHEL 5.5 testing. 
Contact information : Tanvi Verma (tanvi)

Hans,

In your patch, you are handling the situation where IPv4 IP is provided either in a.b.c.d:3260 format or in [a.b.c.d]:3260 format, but for IPv6, it is assumed that input would be in [a:b:c:d:e:f:g:h]:3260 format. Wouldn't it be good if similar check is done for IPv6 IP as well?  We could just add one more condition as follows
 elif count == 2 or count == 9:

Comment 12 Hans de Goede 2009-10-15 06:34:26 UTC
(In reply to comment #11)
> We will be test this bug during RHEL 5.5 testing. 
> Contact information : Tanvi Verma (tanvi)
> 
> Hans,
> 
> In your patch, you are handling the situation where IPv4 IP is provided either
> in a.b.c.d:3260 format or in [a.b.c.d]:3260 format, but for IPv6, it is assumed
> that input would be in [a:b:c:d:e:f:g:h]:3260 format. Wouldn't it be good if
> similar check is done for IPv6 IP as well?  We could just add one more
> condition as follows
>  elif count == 2 or count == 9:  

For IPV6 the [] is mandatory, this is how this is supposed to be done with IPV6 in general, see the RFC's, etc. The reason this is mandatory, is that an IPV6 address such as 1:0:0:0:0:0:0:2 may be written as 1::2, so counting semicolons
won't work.

I've already mailed the installation guide maintainer and asked him to document this.

Comment 13 Tanvi 2009-10-15 06:42:57 UTC
Got your point :)

Comment 15 Hans de Goede 2009-11-24 09:14:25 UTC
This is fixed by this commit:
http://git.fedorahosted.org/git/?p=anaconda.git;a=commitdiff;h=7a04d5d65b4292f853e8daa31ce36521390924d5

Which will be in  anaconda-11.1.2.198-1 .

Comment 17 Alexander Todorov 2009-12-14 13:36:01 UTC
I've verified that this is fixed in GUI and text mode. The port value is parsed correctly. Moving to VERIFIED.

Comment 18 nandkumar mane 2010-02-20 04:17:44 UTC
Verified in RHEL5.5 Beta1. ( anaconda-11.1.2.202-4 ). 
IPv4 port value and IPv6 address parsing works fine during installation. 

Note: mkinitrd still doesn't support IPv6 addresses completely. During installation, I discovered devices using IPv6 address. But on reboot, I could only see IPv4 sessions.

Comment 20 errata-xmlrpc 2010-03-30 08:02:07 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0194.html


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