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:
Created attachment 362178 [details] patch to parse target IP input correctly
Created attachment 362179 [details] patch to parse target IP input correctly during text mode installation
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.
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.
(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.
(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.
@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.
(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
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:
(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.
Got your point :)
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 .
I've verified that this is fixed in GUI and text mode. The port value is parsed correctly. Moving to VERIFIED.
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.
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