Bug 1373970

Summary: VDSM removes HWADDR entries from ifcfg files
Product: Red Hat Enterprise Virtualization Manager Reporter: Javier Coscia <jcoscia>
Component: vdsmAssignee: Dan Kenigsberg <danken>
Status: CLOSED WONTFIX QA Contact: Meni Yakove <myakove>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.2CC: bazulay, gklein, jcoscia, lsurette, mkalinin, srevivo, ycui, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-14 08:35:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Javier Coscia 2016-09-07 14:53:36 UTC
Description of problem:

After setting ifcfg-* net devices files with HWADDR entries and udev rules to rename them to ethX, while installing the host as hypervisor, VDSM removes the HWADDR entries and net device names remain as enoX after reboot

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

rhevm-4.0.2.7-0.1.el7ev.noarch
vdsm-4.18.11-1.el7ev.x86_64

How reproducible:
100% in customer's environment

Steps to Reproduce:
1. Add corresponding HWADDR entry in ifcfg files on host
2. Set udev rules to rename original enoX net devices to ethX
3. Reboot host and ensure net devices are named as ethX
4. Install host as hypervisor from RHVM
5. Reboot hypervisor, net devices are named as enoX instead of ethX

Actual results:

RHV Host doesn't have a working network after reboot

Expected results:

VDSM should not remove HWADDR entries from ifcfg file

Additional info:

As a workaround, customer sets HWADDR manually in ifcfg files after VDSM install.
We have also tried with biosdevname=0 but only with HWADDR in ifcfg files, net devices are named as ethX

Comment 5 Dan Kenigsberg 2016-09-08 11:59:46 UTC
I am reluctant to reintroduce ugly and cumbersome el6-only code, only to keep with the practices of a single customer.

Could you, or the customer follow https://www.ovirt.org/blog/2016/05/modify-ifcfg-files/ to write a vdsm hook which adds the HWADDR line to every written ifcfg file? I think that this is the most viable option, and I'd love to include it as an upstream hook.

Comment 6 Dan Kenigsberg 2016-09-14 08:35:52 UTC
Please note that Bug 1044060 asked us to drop HWADDR as it is considered a bad practice in el7.

Comment 7 Javier Coscia 2016-09-15 20:25:22 UTC
Thanks for the information Dan, fortunately we were able to workaround the issue with udev rules only, there's no need to use HWADDR for this setup.

https://access.redhat.com/solutions/2626591

Clearing needinfo too