Bug 158774

Summary: Interfaces are not renamed by if-eth if they don't exist
Product: [Fedora] Fedora Reporter: Pavel Roskin <plroskin>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: rvokal
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: 2005-05-25 16:52:17 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:
Attachments:
Description Flags
Patch that fixes the problem
none
better patch none

Description Pavel Roskin 2005-05-25 16:06:22 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.8) Gecko/20050512 Fedora/1.0.4-2 Firefox/1.0.4

Description of problem:
/etc/sysconfig/network-scripts/ifup-eth would rename an interface if DEVICE and HWADDR are set in /etc/sysconfig/network-scripts/ifcfg-NAME.  However, it will only happen if DEVICE is already occupied by another device with a different MAC address.

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

How reproducible:
Always

Steps to Reproduce:
1. Rename /etc/sysconfig/network-scripts/ifcfg-eth0 to /etc/sysconfig/network-scripts/ifcfg-tu0
2. Change DEVICE=eth0 to DEVICE=tu0 in that file.
3. Reboot.
  

Actual Results:  The interface is down, still called eth0.

Expected Results:  The interface is up under the name tu0.

Additional info:

I believe the scope of the bug is wider that support for custom names.  Suppose a system has eth0 and eth1.  The hardware for eth0 is removed.  The old eth1 becomes eth0.  It needs to be removed to eth1, but it fails because there is no eth1 already in the system.

Comment 1 Pavel Roskin 2005-05-25 16:11:45 UTC
Created attachment 114838 [details]
Patch that fixes the problem

There is no need to check if FOUNDMACADDR is not empty.  In fact, things are
even better if FOUNDMACADDR is empty, because we don't need to care about
another interface occupying the name.

Comment 2 Bill Nottingham 2005-05-25 16:18:22 UTC
What's your /etc/modprobe.conf look like in this case?

Comment 3 Bill Nottingham 2005-05-25 16:28:54 UTC
Created attachment 114840 [details]
better patch

Actually, this is what you need, otherwise you'll run back into 131461 and
143674.

Comment 4 Bill Nottingham 2005-05-25 16:52:17 UTC
Will be in 8.11.1-1 and later.

Comment 5 Pavel Roskin 2005-05-26 20:19:56 UTC
Everything is working after "yum upgrade".  Thank you!

As for /etc/modprobe.conf, I'm using a custom solid kernel, so it's probalby
irrelevant.  But just in case, here it is:

alias scsi_hostadapter ata_piix                                                
                
alias snd-card-0 snd-intel8x0                                                  
                
options snd-card-0 index=0                                                     
                
install snd-intel8x0 /sbin/modprobe --ignore-install snd-intel8x0 &&
/usr/sbin/alsactl restore >/dev/null 2>&1 || :                                 
                                           
remove snd-intel8x0 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; };
/sbin/modprobe -r --ignore-remove snd-intel8x0                                 
                                        
alias usb-controller ehci-hcd                                                  
                
alias usb-controller1 uhci-hcd                                                 
                
alias tg0 tg3                                                                  
                
alias ee0 eepro100                                                             
                
alias tu0 tulip