Problem:
I am not sure whether this is a foreman or anaconda/kickstart issue: I have configured a new server in foreman for provisioning with AlmaLinux 9.7. The server has two ethernet interfaces which are supposed to be bonded.
I configure everything in Foreman: both ethernet interface as managed interfaces with their mac address and the interface name. In addition, the bond interface with mac address of one of the ethernet, name “bond0”, hostname, domain, ipv4 and ipv6 subnets and ipv4 and ipv6 addresses. The bond interface has all functions checked: managed, primary, provision and remote execution.
Mode 802.3ad, attached devices are the interface names of those two ethernet interfaces, bond options as well.
The installation works when I start PXE/UEFI boot on the server:
- The server gets pointed to the foreman server via dhcp.
- The foreman server sends the grub menu information to boot the kernel for kickstart, setting up the bond with the static ipv4 address (not IPv6) etc. (template Kickstart default PXEGrub2)
- The kernel starts the installer and it downloads the kickstart file which contains the network configuration line for both ipv4 and ipv6 with gateway, dns, etc. (template Kickstart default)
- The installer sets up the current network connection bonded, with working ipv4 and ipv6 address and runs the installation.
- The installation finishes and the server reboots
So far, all good. However, when the server boots it doesn’t have a working network connection. The lacp bond is set up, but the bond0 interface doesn’t have an ip address. The file /etc/NetworkManager/system-connections/bond0.nmconnection contains:
[connection]
id=bond0
uuid=baf65ccb-e4e6-42c9-9c0b-ea7a842f9a29
type=bond
autoconnect=false
autoconnect-priority=-100
autoconnect-retries=1
interface-name=bond0
multi-connect=1
timestamp=1778258229
[ethernet]
mtu=9000
[bond]
miimon=100
mode=802.3ad
xmit_hash_policy=layer2+3
[ipv4]
method=disabled
[ipv6]
addr-gen-mode=eui64
method=ignore
[proxy]
[user]
org.freedesktop.NetworkManager.origin=nm-initrd-generator
So ipv4 is disabled. ipv6 is ignored.
I have checked in a shell during the kickstart installation: it seems the installer writes this during installation.
I am seriously confused to why the installer or nm-initrd-generator as it seems would write this with ipv4 disabled. I don’t really understand if or how I could direct the installer to write the networkmanager configuration instead of relying on nm-initrd-generator which derives it from the kernel options. From the anaconda docs I get the impression that it should be possible to have anaconda configure networkmanager.
What is even more confusing is that if I run /usr/libexec/nm-initrd-generator -s -- ip=... with all the options which are passed to the kernel through grub (e.g. taken from the resolved Kickstart default PXEGrub2 template), it gives me a bond0 interface configuration with the IPv4 address, gateway and dns in place. (ipv6 is disabled, though, as it is not used for booting the kernel).
So I do not understand why /usr/libexec/nm-initrd-generator would disable ipv4 from the kernel options passed not do I understand why the whole network isn’t configured with the static ipv4 and ipv6 address as configured in foreman.
Why doesn’t the server get a working network configuration written into /etc/NetworkManager/system-connections?
Expected outcome:
A networkmanager configuration with a bond interface using the static ipv4 and ipv6 information given by foreman during the installation.
Foreman and Proxy versions:
foreman-3.17.2-1.el9.noarch
katello-4.19.2-1.el9.noarch
Distribution and version:
AlmaLinux 9.7