Redhat or Rocky 9 NetworkManager configuration problem during kickstart

Whilst deploying various Linux os (6/7/8) up until now, initial pxe network config is used to successfully provision a server, then further down the kickstart process, snippet kickstart_network_setup neatly creates a few ifcfg files, which come into play during reboot - all good… that is, up to and including rh and rocky8. However, when deploying rh or rocky9, we note that ifcfg files are still delivered correctly; but new style ‘nmconnection key files’ are also delivered (to /etc/NetworkManager/system-connections), which represent the network configuration in play during initial pxe build (which in our case makes use of a bond / single nic). Upon reboot, our rh / rocky9 server then has conflicts between the two network configuration types, which can sometimes mean network connections don’t get made (e.g. which may include additional connections to other subnets etc).

Expected outcome:
Server provisioned, upon post build reboot, with all networking configured in foreman server entry in play.

Foreman and Proxy versions:
Foreman 3.3.1

Foreman and Proxy plugin versions:
foreman-tasks 6.0.2
foreman_puppet 4.0.4
foreman_remote_execution 7.2.2
katello 4.5.1

Distribution and version:

Other relevant data:
For anyone else who experiences the same issue… We are able to work around simply by removing all nmconnection files under /etc/NetworkManager/system-connections during kickstart, prior to reboot. Also we have considered running ‘nmcli connection migrate’ at this point; but prefer to wait and see if foreman provisioning templates will take the new ‘9’ NetworkManager way of using key files into account in the future? (hint - it looks like the days of ifcfg files is numbered and will not be in use at all when Redhat10 and derivatives are released (518 days time and counting at time of writing :slight_smile: )).

I think with RHEL8+ its easier to just ditch all the config files stuff and simply provide:

network …

lines as needed in the kickstart cfg to describe the desired network configuration, and let anaconda take care of network manager which it will do well.

The “Kickstart default” template works this way, and you can either addon to that code or do what I did and move that section to a snippet and customize the network code for the kickstart even further.

You might want to try upgrading. Foreman 3.3 and Katello 4.5.1 are pretty old.

Which version of Foreman officially supports kickstart for EL9 hosts? I can’t find the documentation for this?
Foreman 3.3 is the upstream of Satellite 6.12 (see Red Hat Satellite Release Dates - Red Hat Customer Portal) and according to Which RHEL versions and architectures are supported as client systems managed by Red Hat Satellite server? - Red Hat Customer Portal you only need Satellite 6.11 (Foreman 3.1) to support EL9 clients which suggests that Foreman 3.3 ought to work for this case? But the kickstart template that comes with Foreman 3.3 wants to always write ifcfg files, even though those are deprecated on EL9 and cause the problem?