On 27/06/2024 17:01, Stefan Hanreich wrote: > This can lead to issue when upgrading from ifupdown to ifupdown2. The > particular issue this fixes occurs in the following scenario: > > * Suppose there is a legacy Debian host with ifupdown and ifenslave > installed that has a bond configured in /etc/network/interfaces. > * ifenslave installs a script /etc/network/if-pre-up.d/ifenslave. > * Now, an upgrade creates a second script > /etc/network/if-pre-up.d/ifenslave.dpkg-new. As ifupdown executes > network scripts via run-parts which ignores scripts with . in their > name, ifenslave.dpkg-new has no effect. > * If the host switches over to ifupdown2 by installing it (removing > ifupdown, keeping ifenslave) and reboots, the network will not come > up: > /etc/network/if-pre-up.d/ifenslave still exists, but is ignored > by ifupdown2's bond addon [1] > /etc/network/if-pre-up.d/ifenslave.dpkg-new is executed by ifupdown2 > because it executes all scripts in /etc/network/if-pre-up.d, even if > their name contains a dot > > This leads to ifreload failing on upgrades, which in turn causes > issues with the networking of upgraded hosts.
Thanks for tackling this! Consider this Tested-by: Friedrich Weber <f.we...@proxmox.com> I tested the following: - Set up a PVE8 VM with an active-backup bond, from /etc/network/interfaces: > auto bond0 > iface bond0 inet manual > bond-slaves ens18 ens19 > bond-miimon 100 > bond-mode active-backup > > auto vmbr0 > iface vmbr0 inet static > address 10.1.1.122/16 > gateway 10.1.1.1 > bridge-ports bond0 > bridge-stp off > bridge-fd 0 - Install ifupdown and ifenslave - Manually create a .dpkg-new: > cp /etc/network/if-pre-up.d/ifenslave > /etc/network/if-pre-up.d/ifenslave.dpkg-new - Reboot -- network comes up fine. - Install latest packaged ifupdown2: > apt install ifupdown2=3.2.0-1+pmx8 - Network is already lost during install - Reboot -- network does not come up, bond0 and vmbr0 report NO-CARRIER - Install ifupdown2 with this patch applied - Reboot -- network comes up fine - Running `execsnoop -l network & sleep 3; ifreload -a` confirms ifenslave.dpkg-new is never executed (ifenslave is never executed by ifupdown2, see the pull request linked by Stefan) _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel