Bug 116187

Summary: networking fails after upgrading the kernel
Product: Red Hat Enterprise Linux 3 Reporter: Alex Weeks <alex>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DEFERRED QA Contact: Brock Organ <borgan>
Severity: high Docs Contact:
Priority: medium    
Version: 3.0CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-28 20:48:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Fixed network script to exclude *ORIG files from getting initialized none

Description Alex Weeks 2004-02-18 20:33:38 UTC
Description of problem:
I recently upgraded my kernel.  when I rebooted after this my
ifcfg-eth* devices failed to boot.  ETH0 initialized, but then the
kernel attempted to initialize the ETH0.ORIG causing neither interface
to initialize.  *ORIG files should not be treated as interface config
files.

Starting on line 54 of the /etc/init.d/network file I can see where
the interface variable is created by doing an ls on the
/etc/sysconfig/network-scripts directory and then doing a grep -v to
remove undesirable files (rpmsave, rpmnew, etc...)  This grep -v
should also include 'ORIG'.

Here is the section of code I am referring to:

--Start clip--
interfaces=`ls ifcfg* | LANG=C egrep -v
'(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | \
            LANG=C egrep -v '(~|\.bak)$' | \
            LANG=C egrep 'ifcfg-[A-Za-z0-9\._-]+$' | \
            sed 's/^ifcfg-//g' |
            sed 's/[0-9]/ &/' | LANG=C sort -k 1,1 -k 2n | sed 's/ //'`
--End clip--

A simple change is all that is required to resolve this issue:

--Start clip--
interfaces=`ls ifcfg* | LANG=C egrep -v
'(ifcfg-lo|:|rpmsave|rpmorig|rpmnew|ORIG)' | \
            LANG=C egrep -v '(~|\.bak)$' | \
            LANG=C egrep 'ifcfg-[A-Za-z0-9\._-]+$' | \
            sed 's/^ifcfg-//g' |
            sed 's/[0-9]/ &/' | LANG=C sort -k 1,1 -k 2n | sed 's/ //'`
--End clip--

I tested it on my system and it works.

Thanks for looking into this.

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


How reproducible:


Steps to Reproduce:
1. rpm -Uvh kernel-smp-2.4.21-6.EL.i686.rpm
2. reboot
3.
  
Actual results:
system boots, but networking fails.

Expected results:
Networking to work.

Additional info:

Comment 1 Alex Weeks 2004-02-18 20:54:05 UTC
Created attachment 97811 [details]
Fixed network script to exclude *ORIG files from getting initialized

Here a copy of the file.

Comment 2 Alex Weeks 2004-03-09 19:14:10 UTC
Has anyone looked at this?

Comment 3 Bill Nottingham 2004-03-09 19:16:29 UTC
Not yet, no. The patch is certainly a workable solution, but what
generates ORIG files for you?

Comment 4 Alex Weeks 2004-03-09 19:26:05 UTC
They appear after updating rpm's on my system.. I had thought they
appeared after upgrading the kernel, but it could have been the
initscripts rpm.  I was suprised that these ORIG files appeared.

On my RH9 and FC1 systems this the ORIG file does not cause networking
to fail, but I applied the patch to those systems also.

I probably shouldn't have opened this as high priority, but I have a
128 node test cluster.  I had to manually start the networking on all
nodes when this happened.

Thanks!

Comment 5 Bill Nottingham 2004-03-09 19:43:54 UTC
Hm, I don't see anything in the post scripts or triggers of current
packages that uses .ORIG.

Comment 6 Bill Nottingham 2004-06-07 19:27:30 UTC
Do you have any sort of config management that generates .ORIG?

Comment 7 Alex Weeks 2004-06-09 12:40:28 UTC
I have nothing that generates an .ORIG file.  I have not seen this
again.  If you want I will just close this and just consider it a fluke.

Comment 8 Bill Nottingham 2004-06-28 20:48:00 UTC
Yeah, probably best.