Feature #37363
open
Add ability to set custom interface names in Kickstart templates
Added by Shimon Shtein about 1 year ago.
Updated about 1 year ago.
Category:
Unattended installations
|
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.
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
Also available in: Atom
PDF