Bug 80322

Summary: DHCP always fails on my SIS900
Product: [Retired] Red Hat Public Beta Reporter: Bernd Bartmann <bernd.bartmann>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: phoebeCC: bengt, dbaggett, dowdle, john, jroyse, ltroan, rvokal, trondeg
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-14 01:24:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 79578    

Description Bernd Bartmann 2002-12-24 13:13:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
During installation I selected DHCP for my network card (SIS900). When booting
the system it always tells me that it couldn't get DHCP informations. Manually
setting the IP address works though.

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


How reproducible:
Always

Steps to Reproduce:
1. Install Phoebe, set DHCP for eth0 (SIS900), no firewall
2. Boot the system --> no IP address is assigned
3.
    

Additional info:

Comment 1 Bill Nottingham 2002-12-24 21:11:34 UTC
What sorts of error messages do you get?

Comment 2 Bernd Bartmann 2002-12-24 21:35:29 UTC
In german:
IP-Informationen werden fuer eth0 bestimmt... fehlgeschlagen; keine Verbindung
vorhanden. Kabel pruefen?

In english this would be something like:
Getting IP-information for eth0... no answer; no connection. Check cable?

Comment 3 Bill Nottingham 2002-12-24 21:36:51 UTC
(from both the dhcp client, and the kernel)

Comment 4 Bernd Bartmann 2002-12-24 21:45:20 UTC
Bill, in case your last comment was meant as an addtional question:
I only see the error message at boot time or when running "ifup eth0". Nothing
unusual in /var/log/messages. The sis900 kernel module is loaded correctly and I
even can get network up and running when manually running "ifconfig".

Comment 5 Bill Nottingham 2002-12-24 21:59:33 UTC
*** Bug 80351 has been marked as a duplicate of this bug. ***

Comment 6 Scott Dowdle 2002-12-24 22:09:13 UTC
Oddly enough, running dhclient by hand works.  Something is odd with the init
scripts.  Running the graphical network config tool... and attempting to
"activate" device causes the net-config program to crash with a runtime error.

As a work around, I'm putting /sbin/dhclient in the rc.local.


Comment 7 Scott Dowdle 2002-12-24 22:58:24 UTC
Hmmm, maybe I'm talking-out-my-ass here... but this stuff seems to be related to
trying to pass a hostname to dhclient?  I don't know.  Whatever I do to try and
automate getting an IP address via DHCP (adding it to rc.local, or willy-nilly
editing the /sbin/ifup script to just run dhclient without any parameters)...
sure, it gets and address and networking works... but something about the
environment doesn't get set right and I can't login to X.  Sucks.  Yeah, I
know.. I provided no details.  What is a proper workaround to this problem?

Oh, well... betas are for fixing stuff.  In any event, it's definitely something
in the /sbin/ifup script.

Comment 8 Bill Nottingham 2002-12-24 23:37:14 UTC
There's stuff in the initscript (see the network-functions file) that checks for
a link before starting dhcp, because it's somewhat silly to sit waiting on dhcp
when there's no cable. Apparently, this code isn't working right on sis900 cards
for some reason.

Comment 9 Douglas Baggett 2002-12-30 02:14:01 UTC
I did some poking around and this is what I have found out.

1. the initscript works IF you "ifconfig eth0 up" first

2. The problems seem to be in /etc/sysconfig/network-scripts/network-functions
shell library.

Within the function check_link_down there is an IF branch that has a preceding
not (!) operator looking to see if LC_ALL is set to "C". Problem is in the same
function library the is_available function does 

LC_ALL= LANG= ip -o link | grep -q $1

Which results in LC_ALL being set to nothing. So, when the check_link_down
function runs with the following logic (excuse the echos, that is from me trying
to find out what is going on)

echo "function start"
    if [ -x /sbin/mii-tool ]; then
        echo "branch executed"
        echo $LC_ALL
        if ! LC_ALL=C ip link show $1 2>/dev/null| grep -q UP ; then
           ip link set $1 up >/dev/null 2>&1
           echo "Check link up"
           ifconfig eth0
           timeout=0
           while [ $timeout -le 20 ]; do
                LC_ALL=C ip link show $1 2>/dev/null | grep -q UP && break
                usleep 500000
                timeout=$((timeout+1))
           done
        fi


The second if block does not get executed as it should. I've been able to fix
the problem by taking out the "!".

I don't consider myself an expert shell programmer. There seems to be something
in the way that the SIS adapter reports text within "ip -o link" that does not
set the LC_ALL variable to "C". What it is I cannot say because that is the only
adapter I have. 

Anyhow, that's my analysis. BTW...what the the LC_ALL variable for anyhow?


Comment 10 Douglas Baggett 2002-12-30 12:45:01 UTC
Err....

I think I may have the logic in my analysis reversed when talking about the "!".
I hate thinking about reverse logic. That's what I get for looking at this thing
on a late sunday night after 3 beers.

Anyhow. I hope that clears any confusion

Comment 11 Bill Nottingham 2002-12-30 20:27:47 UTC
*** Bug 80731 has been marked as a duplicate of this bug. ***

Comment 12 Bengt Hammarlund 2003-01-13 04:41:50 UTC
this bug happens in my RedHat 8.0 version (the one that is avaliable to 
download but is not the beta one). My card is a 3Com 3C905B. This but is not 
only for SIS cards - I think all NICs a affected. And is not only in the BETA 
PHOEBE, for shure! Manually running the dhcpclient solves the problem! I got 
this same EXACT BUG!

Comment 13 Bengt Hammarlund 2003-01-13 04:43:36 UTC
sorry for my VERY BAD English, I'm from Brazil and it's 2:38 of the morning. =]

Comment 14 Trond Eivind Glomsrød 2003-01-13 12:50:21 UTC
Fwiw, on the systems I use, they all work on RHL 8.0. Including the SiS one.
With the phoebe beta, all systems except the SiS one work.

Comment 15 Bill Nottingham 2003-01-14 01:24:09 UTC
Will be fixed in 7.03-1.

Comment 16 Trond Eivind Glomsrød 2003-01-15 14:17:59 UTC
Fix confirmed.

Comment 17 Bernd Bartmann 2003-01-21 20:51:24 UTC
Indeed, fix confirmed for me under Phoebe2 too.

Comment 18 Bill Nottingham 2003-01-30 05:20:15 UTC
*** Bug 83010 has been marked as a duplicate of this bug. ***