Project

General

Profile

Actions

Feature #37363

open

Add ability to set custom interface names in Kickstart templates

Added by Shimon Shtein 15 days ago. Updated 15 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Unattended installations
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

We should add a way to statically set interface names as part of the kernel options. This is especially important for bond slaves.

We can use the "ifname=" kernel option to set the names of interfaces during the anaconda boot phase.

Actions #1

Updated by Shimon Shtein 15 days ago

It looks like the correct code would be to change the kickstart_kernel_options
from:

  # bond
  if iface.bond? && rhel_compatible && os_major >= 6
    bond_slaves = iface.attached_devices_identifiers.join(',')
    options.push("bond=#{iface.identifier}:#{bond_slaves}:mode=#{iface.mode},#{iface.bond_options.tr(' ', ',')}")
  end

to

  if iface.bond? && rhel_compatible && os_major >= 6
    iface.attached_devices_identifiers.each do |ident|
        @host.interfaces.map do |nic|
            if ident == nic.identifier
                options.push("ifname=#{nic.identifier}:#{nic.mac}")
            end
        end
    end
    bond_slaves = iface.attached_devices_identifiers.join(',')
    options.push("bond=#{iface.identifier}:#{bond_slaves}:mode=#{iface.mode},#{iface.bond_options.tr(' ', ',')}")
  end
Actions

Also available in: Atom PDF