Actions
Feature #37363
openAdd ability to set custom interface names in Kickstart templates
Status:
New
Priority:
Normal
Assignee:
-
Category:
Unattended installations
Target version:
-
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.
Updated by Shimon Shtein about 1 year 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