Disable predictable NIC names

* specify net.ifnames=0 to disable Predictable NIC names for cobbler
  Ubuntu profiles
* specify net.ifnames=0 biosdevname=0 in nailgun in order to change NIC
  scheme during preseed provisioning
* Copy /target/etc/network/interfaces to /etc/network/interfaces as
  finish-install.d/55netcfg-copy-config from netcfg always copies it back to
  /target

Change-Id: Ice24badd3ccc50c4b10230601cbf06788376c86c
Closes-Bug: 1430271
Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
This commit is contained in:
Sergii Golovatiuk 2015-03-16 10:47:05 +01:00
parent 5021dce212
commit 441b274451
4 changed files with 5 additions and 3 deletions

View File

@ -39,7 +39,7 @@ class cobbler::profile::ubuntu_1204_x86_64(
# default password is 'r00tme'
$ks_encrypted_root_password = "\$6\$tCD3X7ji\$1urw6qEMDkVxOkD33b4TpQAjRiCeDZx0jmgMhDYhfB9KuGfqO9OcMaKyUxnGGWslEDQ4HxTw7vcAMP85NxQe61",
$kopts = "priority=critical locale=en_US biosdevname=0 netcfg/choose_interface=auto auto=true netcfg/dhcp_timeout=120 netcfg/link_detection_timeout=20 elevator=deadline",
$kopts = "auto=true priority=critical locale=en_US net.ifnames=0 biosdevname=0 netcfg/choose_interface=auto netcfg/dhcp_timeout=120 netcfg/link_detection_timeout=20 elevator=deadline",
){
case $operatingsystem {

View File

@ -39,7 +39,7 @@ class cobbler::profile::ubuntu_1404_x86_64(
# default password is 'r00tme'
$ks_encrypted_root_password = "\$6\$tCD3X7ji\$1urw6qEMDkVxOkD33b4TpQAjRiCeDZx0jmgMhDYhfB9KuGfqO9OcMaKyUxnGGWslEDQ4HxTw7vcAMP85NxQe61",
$kopts = "priority=critical locale=en_US biosdevname=0 netcfg/choose_interface=auto auto=true netcfg/dhcp_timeout=120 netcfg/link_detection_timeout=20 elevator=deadline",
$kopts = "auto=true priority=critical locale=en_US net.ifnames=0 biosdevname=0 netcfg/choose_interface=auto netcfg/dhcp_timeout=120 netcfg/link_detection_timeout=20 elevator=deadline",
){
case $operatingsystem {

View File

@ -153,6 +153,8 @@ $SNIPPET('ubuntu_precise_packages_late')
$SNIPPET('ubuntu_partition_late')
$SNIPPET('ubuntu_disable_pxe') && \
$SNIPPET('ubuntu_network') && \
##FIXME Ubuntu 14.04 55netcfg-copy-config always cp /etc/network/interfaces /target/etc/network/interfaces
cp /target/etc/network/interfaces /etc/network/interfaces && \
$SNIPPET('cinder_create_lvm_group__ubuntu') && \
$SNIPPET('ubuntu_puppet_config') && \
$SNIPPET('ubuntu_mcollective_config') && \

View File

@ -137,7 +137,7 @@ class nailgun::cobbler(
cobbler_profile { 'ubuntu_1404_x86_64':
kickstart => '/var/lib/cobbler/kickstarts/ubuntu-amd64.preseed',
kopts => 'netcfg/choose_interface=eth0 netcfg/dhcp_timeout=120 netcfg/link_detection_timeout=20',
kopts => 'inet.ifnames=0 biosdevname=0 netcfg/choose_interface=eth0 netcfg/dhcp_timeout=120 netcfg/link_detection_timeout=20',
distro => 'ubuntu_1404_x86_64',
ksmeta => '',
menu => true,