Bug 1249750

Summary: Two ifcfg files for one interface when installing with net.ifnames=0
Product: Red Hat Enterprise Linux 7 Reporter: Jan Stodola <jstodola>
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: jstodola, rvykydal
Target Milestone: rc   
Target Release: ---   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-21.48.22.60-1 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 23:08:29 UTC Type: Bug
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: 1186677    

Description Jan Stodola 2015-08-03 17:27:29 UTC
Description of problem:
There are two ifcfg files for one network device after installation on s390x with the "net.ifnames=0" boot option:

[root@rtt7 ~]# ls /etc/sysconfig/network-scripts/ifcfg-eth0*
/etc/sysconfig/network-scripts/ifcfg-eth0  /etc/sysconfig/network-scripts/ifcfg-eth0-1
[root@rtt7 ~]#

The configuration files differ.

Version-Release number of selected component (if applicable):
RHEL-7.1 GA (anaconda-19.31.123-1.el7)
RHEL-7.2-20150803.n.0 (anaconda-21.48.22.28-1.el7)

How reproducible:
always

Steps to Reproduce:
1. start the installation with the "net.ifnames=0" boot option
2. proceed through the installation
3. reboot to installed system

Actual results:
Two different config files for one network device:
ifcfg-eth0
ifcfg-eth0-1

Expected results:
One ifcfg file per network device

Comment 8 Radek Vykydal 2015-08-06 11:11:51 UTC
Anaconda creates extra connection because it doesn't recognize ifcfg file created in dracut because it has neither HWADDR (because it is s390) nor DEVICE (because we are using kernel names instead of persistent names, net.ifnames=0) binding info. Assuming dracut's ifcfg file is fine, we probably need to look for NAME in this case.

Here is updates image for RHEL-7.2-20150803.n.0 with a patch:
https://rvykydal.fedorapeople.org/updates.ifcfgdouble.img

Does it fix your case?

Comment 10 Radek Vykydal 2015-08-10 10:10:23 UTC
Thanks for testing, this update should do better (I gave it some checking with fake ifcfg in vm).

https://rvykydal.fedorapeople.org/updates.ifcfgdoublev2.img

Comment 11 Jan Stodola 2015-08-10 12:04:25 UTC
v2 works fine. There is just one ifcfg file, as expected.

Comment 12 Radek Vykydal 2015-08-10 12:59:21 UTC
(In reply to Radek Vykydal from comment #10)
> Thanks for testing, this update should do better (I gave it some checking
> with fake ifcfg in vm).
> 
> https://rvykydal.fedorapeople.org/updates.ifcfgdoublev2.img

The patch:
https://github.com/rvykydal/anaconda/commit/bb3e999efbab7cbe47317efaf62a8dcb186a0fde

Comment 15 Jan Stodola 2016-07-19 10:48:45 UTC
Retested with anaconda-21.48.22.79-1.el7, this issue is no longer reproducible, there is just one ifcfg file created (ifcfg-eth0) when installing with the net.ifnames=0 boot option.

Thanks, moving to VERIFIED.

Comment 17 errata-xmlrpc 2016-11-03 23:08:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2158.html