Instance network device names changing after an upgrade to 2.16

21 views
Skip to first unread message

Michael Witrant

unread,
Jul 22, 2023, 6:18:01 AM7/22/23
to ganeti
Hello,

I've recently upgraded an old Ganeti cluster from 2.15 to 2.16 (after upgrading the nodes OS) and the network interface names inside the kvm instances changed from ens5, ens6, etc.  to ens13, ens14, etc. It only happens after the first reboot of the instance after the upgrade. The instance then boots without network access because the interface names are hardcoded inside /etc/network/interfaces.

Is there a way to change the interface names back to their previous value so that I don't have to change all my instances' configuration?

Or is there at least a way to make the network interface names fixed so that future upgrades won't change them again? I've seen people using the kernel parameter net.ifnames=0. Is that the recommended way?

Rudolph Bott

unread,
Jul 22, 2023, 7:19:30 AM7/22/23
to gan...@googlegroups.com
Hi Michael,

I've recently upgraded an old Ganeti cluster from 2.15 to 2.16 (after upgrading the nodes OS) and the network interface names inside the kvm instances changed from ens5, ens6, etc.  to ens13, ens14, etc. It only happens after the first reboot of the instance after the upgrade. The instance then boots without network access because the interface names are hardcoded inside /etc/network/interfaces.

AFAIR the device configuration / PCI layout that is visible to the guests has changed between 2.15 and 2.16. This only becomse visible when an instance is restarted after the cluster has been upgraded. Instances that have been started before the upgrade still run with the old configuration/qemu parameters. Back then when 2.16 was released "predictable interface names" inside guests probably were not a (widely spread) thing yet so nobody noticed or cared. With more recent guest systems, this has become an issue though. We also ran into this problem a while a go and solved it by changing the guests network configuration from ensX to eth0 and adding net.ifnames=0 to the boot parameter list before rebooting the guest.
 

Is there a way to change the interface names back to their previous value so that I don't have to change all my instances' configuration?

Unfortunately no. In Addition to that, adding disks to the instance always increments the NIC name (because each disk comes with a separate PCI device 'ahead' of the NIC devices).
 

Or is there at least a way to make the network interface names fixed so that future upgrades won't change them again? I've seen people using the kernel parameter net.ifnames=0. Is that the recommended way?

This is at least the route we took. Not perfect, but it works for us.
 
Cheers,
Rudi


--
 Rudolph Bott - bo...@sipgate.de

 sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
 HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
 Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

Reply all
Reply to author
Forward
0 new messages