Bug 246135 - Exception raised when using anaconda locally (with rootpath) and weird interface names
Summary: Exception raised when using anaconda locally (with rootpath) and weird interf...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda
Version: 5.0
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Joel Andres Granados
QA Contact: Alexander Todorov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-28 18:48 UTC by Eric-Olivier Lamey
Modified: 2008-05-21 15:30 UTC (History)
1 user (show)

Fixed In Version: RHBA-2008-0397
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 15:30:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
anaconda-RHEL-5-compareNetDevices.patch (714 bytes, patch)
2007-07-24 18:13 UTC, David Cantrell
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0397 0 normal SHIPPED_LIVE anaconda bug fix and enhancement update 2008-05-19 23:11:23 UTC

Description Eric-Olivier Lamey 2007-06-28 18:48:33 UTC
Description of problem:

When using anaconda to install RHEL5 on a local partition (with --rootpath), without a kickstart file, an 
exception is raised on the first network screen in isys.py when one of the interfaces contains a dot.

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

anaconda-11.1.2.36 on RHEL5

How reproducible:

Setup an interface with a dot before launching anaconda.
  
Actual results:

  File "/usr/lib/anaconda/isys.py", line 508, in compareNetDevices
    trimmed_second = int(second.lstrip(string.letters))
  File "/usr/lib/anaconda/textw/network_text.py", line 439, in __call__
    list.sort(cmp=isys.compareNetDevices)
  File "/usr/lib/anaconda/text.py", line 565, in run
    rc = win(self.screen, instance)
  File "/usr/sbin/anaconda", line 970, in ?
    anaconda.intf.run(anaconda)
ValueError: invalid literal for int(): 0.3

Expected results:

Working network configuration screen.

Additional info:

The exception is also raised when the interface name doesn't have a number in it (the int() cast fails).

Comment 1 David Cantrell 2007-07-24 18:13:16 UTC
Easy enough to patch.  We can use Python's float() function rather than int()
and perform floating point comparisons rather than integer comparisons.

Comment 2 David Cantrell 2007-07-24 18:13:57 UTC
Created attachment 159872 [details]
anaconda-RHEL-5-compareNetDevices.patch

Comment 3 RHEL Program Management 2007-10-16 03:55:53 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 Alexander Todorov 2008-02-19 13:15:25 UTC
(In reply to comment #4)
> dcantrell: Why does the network device have a dot in it (0.3)?  Is this a xen
> dom0 system with funky NIC names?
> 
jlaska, 
it could be an alias (I think that was the name) in the sence of ifconfig eth0:1
or something that came from Xen (e.g vif0.0)



Comment 7 Alexander Todorov 2008-02-20 14:55:22 UTC
Eric,
can you please describe the exact steps you use to reproduce this bug? 
I'm able to setup an interface with a strange name but I can't launch anaconda
to use it. While anaconda is running I can't figure out how to rename the
interface really. 

Comment 8 Alexander Todorov 2008-02-21 13:15:35 UTC
Steps to reproduce:

1) edit /etc/sysconfig/hwconf and change eth0 to eth0.0
2) edit /etc/sysconfig/network-scripts/ifcfg-eth0 and change eth0 to eth0.0
3) reboot. machine now has device eth0.0
4) yum install anaconda-runtime
5) /usr/sbin/anaconda --rootpath=/home/rootpath/ --method=http://server/tree


NOTE: The above seems to not work on Xen paravirtual guest. It the guest fails
to bring up the eth0.0 interface.

Can't verify. Hits bug #433777

Comment 9 Joel Andres Granados 2008-02-21 19:41:20 UTC
Im asking myself the same thing as alex.  To make --rootpath work in a RHEL5
install requires a bit of configuration so anaconda doesnt traceback.  Please
(Eric)  correct me if I am wrong.  

Things you have to do in RHEL5-GOLD
1. Set the ANACONDA_PRODUCTPATH=Server.  or Client or whatever you are installing.
2. diable/erase all yum plugins.

Things you have to do in RHEL5-U1
1. Set the ANACONDA_PRODUCTPATH=Server.  or Client or whatever you are installing.
2. mkdir -p /mnt/runtime/usr/sbin
3. disable/erase all yum plugins


Things you have to do in RHEL5-U2:
same as U1

The three modification will get you to a point where you can test this bug. 
hope its solved ;)  but when anaconda starts downloading the packages it breakes
in all three versions 5.0 5.1 5.2.

i wonder how relevant it is to treat these probles here, when the --rootpath
worked perfectly fine in f8 and, I assume, rawhide.

Comment 11 Alexander Todorov 2008-02-22 09:53:16 UTC
with the steps in comment #9 I get anaconda working. I get the screen:

Welcome to anaconda                                                             
                                                                                
    +----------------------+ Network Configuration +----------------------+     
    |                                                                     |     
    | The current configuration settings for each interface are listed    |     
    | next to the device name.  Unconfigured interfaces are shown as      |     
    | UNCONFIGURED.  To configure an interface, highlight it and choose   |     
    | Edit.  When you are finished, press OK to continue.                 |     
    |                                                                     |     
    |                   eth0.0: Active on boot, DHCP  ^                   |     
    |                   eth1:                         #                   |     
    |                   eth2:                         :                   |     
    |                   eth3:                         :                   |     
    |                   eth4:                         v                   |     
    |                                                                     |     
    |        +------+               +----+               +------+         |     
    |        | Edit |               | OK |               | Back |         |     
    |        +------+               +----+               +------+         |     
    |                                                                     |     
    |                                                                     |     
    +---------------------------------------------------------------------+     
                                                                                
                    Loading /lib/kbd/keymaps/i386/qwerty/us.map.gz              
  <Tab>/<Alt-Tab> between elements   |  <Space> selects   |  <F12> next screen 

Configure eth0.0 to use DHCP then proceed up to the package selection screen.

I'm putting this BZ in verified

Comment 13 errata-xmlrpc 2008-05-21 15:30:24 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 the 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-2008-0397.html



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