Puzzled about having both eth0.nmconnection and ifcfg-eth0 files

On a VPS with a recent Rocky 9 installation, cloud-init gave me an ifcfg-eth0 file in addition to eth0.nmconnection.

/etc/NetworkManager/system-connections/eth0.nmconnection
and
/etc/sysconfig/network-scripts/ifcfg-eth0

Both files have valid configurations and so far no signs of conflict or network weirdness.

I didn’t notice this until after Interworx was installed. Time stamps show that ifcfg-eth0 came roughly an hour after installing the OS, which coincides with the time it took for server prep and installing Interworx. Which has me wondering if Interworx is using the older file.

If not, which would be safer, deleting ifcfg-eth0 and restarting NetworkManager, or running nmcli connection migrate as described in readme-ifcfg-rh.txt?

Hello–

EL9 servers are managed solely via the NetworkManager path as far as InterWorx is concerned. Since cloud-init is involved, I suspect that is where the file came from. I know it often tries to hedge its bets and write both when it can. What little network profile management InterWorx does is all done through nmcli as of EL9.

I think either path is probably fine. I know when we initially switched from ifcfg to nmcli in development, we used the nmcli connection migrate route, but that was before there was any NetworkManager stuff written. I recommend that you double check that the nmconnection profile accounts for everything in the ifcfg config. I also strongly recommend backups in cases like this too. It can never hurt.

Brandon

1 Like

eth0.nmconnection seems fine. In fact, it’s identical to an Alma 9 config on the same system done last week, except in that case an ifcfg-eth0 didn’t show up. Thinking about it, migrating makes no sense given that the end result is already in place. What makes sense is getting rid of the older file and if cloud-init puts it back just ignore it and move on.

Thanks, Brandon!

1 Like