Project

General

Profile

Actions

Bug #39329

open

Order of network statements in anaconda kickstart with bond interfaces

Added by Gerald Vogt about 1 month ago.

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

Description

I think the order is incorrect. See also community post https://community.theforeman.org/t/almalinux-9-kickstart-with-bonded-network-interface

https://github.com/theforeman/foreman/blob/c9c3ec5ef598aa5f74772f157a3b55fa1879dcdc/app/views/unattended/provisioning_templates/provision/kickstart_default.erb#L120

The comment says "start with provisioning interface, then other non-bond non-bridge interfaces and the bonds + bridges at the end" but the code line after that says otherwise:

@host.interfaces.reject{ |iface| iface.bmc? }.sort_by { |iface| (iface.bond? || iface.bridge?) ? 0 : iface.provision? ? 20 : 10 }.each do |iface|

IIRC, sort_by sorts ascending, i.e. in this order:

0: bond or bridge interfaces (regardless of whether it's a provision interface or not)
10: any other interface NOT marked provision
20: any other interface marked provision

However, from various tests it seems that the kickstart will write the bond configuration prematurely to the disk if it is set up first before the slave interfaces.

I have switched the "20" and the "0" in that line of code so that a bond interface is put in last. At least for me, it's working now and the bond interface is configured with the correct ip addresses instead of "disabled".

No data to display

Actions

Also available in: Atom PDF