Bug 1300609 - Disable "consistent network device naming" by default if provider is VMWare
Disable "consistent network device naming" by default if provider is VMWare
Status: CLOSED WONTFIX
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning Templates (Show other bugs)
6.1.5
Unspecified Unspecified
unspecified Severity low (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-21 04:35 EST by Harald Jensås
Modified: 2017-08-01 16:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 16:13:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Harald Jensås 2016-01-21 04:35:14 EST
Description of problem:
When using the "consistent network device naming" in RHEL 7.x e.g net.ifnames=1 (the default) on VMWare the network interface names are enoXXXXXX, and not at all predictable.

This is confusing at best, and makes it impossible to predictably configure multiple network interfaces from Satelllite 6.

This KCS article provides a workaround: https://access.redhat.com/solutions/2124401

By using @host.provider it is trivial to add a conditional to Satellite 6 templates that will turn of net.ifnames for one, or more, providers. Below are examples for Kicstart, PXELinux and iPXE templates.


Satellite Kicstart Default template:
------------------------------------
@@ -37,10 +37,12 @@
 timezone --utc <%= @host.params['time-zone'] || 'UTC' %>
 
 <% if @host.operatingsystem.name == 'Fedora' and os_major <= 16 -%>
 # Bootloader exception for Fedora 16:
+bootloader --append="nofb quiet splash=quiet <%=ks_console%> <%= 'net.ifnames=0' if ['VMWare'].include?(@host.provider)-%>" <%= grub_pass %> 
-bootloader --append="nofb quiet splash=quiet <%=ks_console%>" <%= grub_pass %>
 part biosboot --fstype=biosboot --size=1
+<% elsif @host.operatingsystem.name != 'Fedora' and os_major >= 7 -%>
+bootloader --location=mbr --append="nofb quiet splash=quiet <%= 'net.ifnames=0' if ['VMWare'].include?(@host.provider)-%>" <%= grub_pass %>
 <% else -%>
 bootloader --location=mbr --append="nofb quiet splash=quiet" <%= grub_pass %>
 <% end -%>


Kickstart default iPXE template:
--------------------------------
@@ -19,8 +19,12 @@
 
 <%# This template will not function with Safemode set to true.
     Please disable it in Settings > Provisioning               %>
 
+<% if @host.operatingsystem.name != 'Fedora' and @host.operatingsystem.major.to_i >= 7 -%>
+kernel <%= "#{@host.url_for_boot(:kernel)}" %> ks=<%= foreman_url('provision')%><%= static %> ksdevice=<%= @host.mac %> network kssendmac ip=${netX/ip} netmask=${netX/netmask} gateway=${netX/gateway} dns=${dns} <%= 'net.ifnames=0' if ['VMWare'].include?(@host.provider)%>
+<% else -%>
 kernel <%= "#{@host.url_for_boot(:kernel)}" %> ks=<%= foreman_url('provision')%><%= static %> ksdevice=<%= @host.mac %> network kssendmac ip=${netX/ip} netmask=${netX/netmask} gateway=${netX/gateway} dns=${dns}
+<% end -%>
 initrd <%= "#{@host.url_for_boot(:initrd)}" %>
 
 boot


Kickstart default PXELinux template:
------------------------------------
@@ -19,11 +19,11 @@
 default linux
 label linux
 kernel <%= @kernel %>
 <% if @host.operatingsystem.name == 'Fedora' and @host.operatingsystem.major.to_i > 16 -%>
+append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%> ks.device=bootif network ks.sendmac <%= 'net.ifnames=0' if ['VMWare'].include?(@host.provider)%>
-append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%> ks.device=bootif network ks.sendmac
 <% elsif @host.operatingsystem.name != 'Fedora' and @host.operatingsystem.major.to_i >= 7 -%>
+append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%> network ks.sendmac <%= 'net.ifnames=0' if ['VMWare'].include?(@host.provider)%>
-append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%> network ks.sendmac
 <% else -%>
 append initrd=<%= @initrd %> ks=<%= foreman_url('provision')%> ksdevice=bootif network kssendmac
 <% end -%>
 IPAPPEND 2





Version-Release number of selected component (if applicable):
Sat 6.x



How reproducible:
Easy

Steps to Reproduce:
1. Provision a RHEL7 vm on VMWare compute resource
2. ls ls -l /sys/class/net
3.

Actual results:
The network interface names are enpXXXXX

Expected results:
The network interface name are enpXXXXX

Additional info:
The issue here is that the information in the "hardware" on VMWare does not provide information that is predictable. They are consistent accross reboots, but if you provision 2 VM's with the same VM configratib spec in VMWare the NIC's will have completely different names in the two VM's.

It is more predictable to disable net.ifnames in this case to get the kernel default "ethX" naming scheme.
Comment 1 Bryan Kearney 2016-07-26 15:06:29 EDT
Moving 6.2 bugs out to sat-backlog.
Comment 2 Bryan Kearney 2017-08-01 16:13:20 EDT
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in product in the forseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.

Note You need to log in before you can comment on or make changes to this bug.