I re-verified the fix using systemd 249.11-0ubuntu3.15 from jammy- proposed:
root@ubuntu:/home/ubuntu# cat > /etc/apt/sources.list.d/proposed.list << EOF deb http://archive.ubuntu.com/ubuntu/ jammy-proposed main universe EOF root@ubuntu:/home/ubuntu# sudo apt update Get:1 http://archive.ubuntu.com/ubuntu jammy-proposed InRelease [279 kB] Hit:2 http://us.archive.ubuntu.com/ubuntu jammy InRelease Hit:3 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease Hit:4 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease Get:6 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages [364 kB] Get:7 http://archive.ubuntu.com/ubuntu jammy-proposed/main i386 Packages [98.8 kB] Get:8 http://archive.ubuntu.com/ubuntu jammy-proposed/main Translation-en [75.1 kB] Get:9 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 DEP-11 Metadata [5,720 B] Get:10 http://archive.ubuntu.com/ubuntu jammy-proposed/main DEP-11 48x48 Icons [1,625 B] Get:11 http://archive.ubuntu.com/ubuntu jammy-proposed/main DEP-11 64x64 Icons [2,436 B] Get:12 http://archive.ubuntu.com/ubuntu jammy-proposed/main DEP-11 64x64@2 Icons [29 B] Get:13 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 c-n-f Metadata [1,740 B] Get:14 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 Packages [85.1 kB] Get:15 http://archive.ubuntu.com/ubuntu jammy-proposed/universe i386 Packages [32.4 kB] Get:16 http://archive.ubuntu.com/ubuntu jammy-proposed/universe Translation-en [30.0 kB] Get:17 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 DEP-11 Metadata [1,448 B] Get:18 http://archive.ubuntu.com/ubuntu jammy-proposed/universe DEP-11 48x48 Icons [4,982 B] Get:19 http://archive.ubuntu.com/ubuntu jammy-proposed/universe DEP-11 64x64 Icons [8,742 B] Get:20 http://archive.ubuntu.com/ubuntu jammy-proposed/universe DEP-11 64x64@2 Icons [29 B] Get:21 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 c-n-f Metadata [1,344 B] Fetched 993 kB in 1s (984 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done 36 packages can be upgraded. Run 'apt list --upgradable' to see them. root@ubuntu:/home/ubuntu# sudo apt install -y -t jammy-proposed systemd Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: libnss-systemd libpam-systemd libsystemd0 systemd-oomd systemd-sysv systemd-timesyncd Suggested packages: systemd-container libtss2-rc0 The following packages will be upgraded: libnss-systemd libpam-systemd libsystemd0 systemd systemd-oomd systemd-sysv systemd-timesyncd 7 upgraded, 0 newly installed, 0 to remove and 29 not upgraded. Need to get 5,310 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 libnss-systemd amd64 249.11-0ubuntu3.15 [133 kB] Get:2 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 systemd-timesyncd amd64 249.11-0ubuntu3.15 [31.2 kB] Get:3 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 systemd-sysv amd64 249.11-0ubuntu3.15 [10.5 kB] Get:4 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 systemd-oomd amd64 249.11-0ubuntu3.15 [34.8 kB] Get:5 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 libpam-systemd amd64 249.11-0ubuntu3.15 [203 kB] Get:6 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 systemd amd64 249.11-0ubuntu3.15 [4,581 kB] Get:7 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 libsystemd0 amd64 249.11-0ubuntu3.15 [317 kB] Fetched 5,310 kB in 3s (1,550 kB/s) (Reading database ... 182844 files and directories currently installed.) Preparing to unpack .../0-libnss-systemd_249.11-0ubuntu3.15_amd64.deb ... Unpacking libnss-systemd:amd64 (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ... Preparing to unpack .../1-systemd-timesyncd_249.11-0ubuntu3.15_amd64.deb ... Unpacking systemd-timesyncd (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ... Preparing to unpack .../2-systemd-sysv_249.11-0ubuntu3.15_amd64.deb ... Unpacking systemd-sysv (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ... Preparing to unpack .../3-systemd-oomd_249.11-0ubuntu3.15_amd64.deb ... Unpacking systemd-oomd (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ... Preparing to unpack .../4-libpam-systemd_249.11-0ubuntu3.15_amd64.deb ... Unpacking libpam-systemd:amd64 (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ... Preparing to unpack .../5-systemd_249.11-0ubuntu3.15_amd64.deb ... Unpacking systemd (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ... Preparing to unpack .../6-libsystemd0_249.11-0ubuntu3.15_amd64.deb ... Unpacking libsystemd0:amd64 (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ... Setting up libsystemd0:amd64 (249.11-0ubuntu3.15) ... Setting up systemd (249.11-0ubuntu3.15) ... Setting up systemd-timesyncd (249.11-0ubuntu3.15) ... Setting up systemd-oomd (249.11-0ubuntu3.15) ... Setting up systemd-sysv (249.11-0ubuntu3.15) ... Setting up libnss-systemd:amd64 (249.11-0ubuntu3.15) ... Setting up libpam-systemd:amd64 (249.11-0ubuntu3.15) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for dbus (1.12.20-2ubuntu4.1) ... Processing triggers for libc-bin (2.35-0ubuntu3.9) ... Created the bond config: root@ubuntu:/home/ubuntu# cat > /etc/netplan/bond.yaml << EOF network: version: 2 renderer: networkd ethernets: enp5s0: dhcp4: no enp6s0: dhcp4: no bonds: bond0: dhcp4: yes interfaces: - enp5s0 - enp6s0 parameters: mode: active-backup primary: enp5s0 EOF root@ubuntu:/home/ubuntu# netplan generate && netplan apply root@ubuntu:/home/ubuntu# exit Then confirmed the fix: ubuntu@ubuntu:~$ sudo touch /run/systemd/network/* [sudo] password for ubuntu: ubuntu@ubuntu:~$ networkctl reload ubuntu@ubuntu:~$ journalctl -u systemd-networkd -b --grep "Link DOWN" --since "1 min ago" -- No entries -- ubuntu@ubuntu:~$ networkctl reconfigure enp5s0 ubuntu@ubuntu:~$ networkctl reconfigure enp6s0 ubuntu@ubuntu:~$ journalctl -u systemd-networkd -b --grep "Link DOWN" --since "1 min ago" -- No entries -- ubuntu@ubuntu:~$ networkctl status ● State: routable Online state: online Address: 10.19.111.174 on bond0 fd42:3cda:638d:a9b3:fc7c:11ff:fe7c:8116 on bond0 fe80::b060:ca04:116b:f545 on enp5s0 fe80::fc7c:11ff:fe7c:8116 on bond0 Gateway: 10.19.111.1 on bond0 fe80::216:3eff:fe07:85b6 on bond0 DNS: 10.19.111.1 Search Domains: lxd Feb 28 16:23:21 ubuntu systemd-networkd[2884]: enp5s0: Re-configuring with /run/systemd/network/10-netplan-enp5s0.network Feb 28 16:23:25 ubuntu systemd-networkd[2884]: enp6s0: Re-configuring with /run/systemd/network/10-netplan-enp6s0.network Feb 28 16:24:29 ubuntu systemd-networkd[2884]: bond0: Re-configuring with /run/systemd/network/10-netplan-bond0.network Feb 28 16:24:29 ubuntu systemd-networkd[2884]: bond0: DHCP lease lost Feb 28 16:24:29 ubuntu systemd-networkd[2884]: bond0: DHCPv6 lease lost Feb 28 16:24:29 ubuntu systemd-networkd[2884]: enp5s0: Re-configuring with /run/systemd/network/10-netplan-enp5s0.network Feb 28 16:24:29 ubuntu systemd-networkd[2884]: enp6s0: Re-configuring with /run/systemd/network/10-netplan-enp6s0.network Feb 28 16:24:29 ubuntu systemd-networkd[2884]: bond0: DHCPv4 address 10.19.111.174/24 via 10.19.111.1 Feb 28 16:24:45 ubuntu systemd-networkd[2884]: enp5s0: Re-configuring with /run/systemd/network/10-netplan-enp5s0.network Feb 28 16:24:49 ubuntu systemd-networkd[2884]: enp6s0: Re-configuring with /run/systemd/network/10-netplan-enp6s0.network ubuntu@ubuntu:~$ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 enp5s0 ether enslaved configured 3 enp6s0 ether enslaved configured 4 bond0 bond routable configured 4 links listed. ** Tags removed: verification-needed-jammy ** Tags added: verification-done-jammy -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/2003250 Title: networkctl reload with bond devices causes slaves to go DOWN and UP, causing couple of seconds of network loss Status in systemd package in Ubuntu: Fix Released Status in systemd source package in Jammy: Fix Committed Status in systemd source package in Kinetic: Won't Fix Bug description: [SRU TEMPLATE] [DESCRIPTION] We currently use Ubuntu 22.04.1 LTS including updates for our production cloud (switched from legacy Centos 7). Although we like the distribution we recently hit serious systemd buggy behavior described in [1] bugreport using packages [2]. Unfortunatelly the clouds we are running consist of openstack on top of kubernetes and we need to have complex network configuration including linux bond devices. Our observation is that every time we apply our configuration via CI/CD infrastructure using ansible and netplan (regardless whether there is actual network configuration change) we see approximatelly 8-16 seconds network interruptions and see bond interfaces going DOWN and then UP. We expect bond interfaces stay UP when there is no network configuration change. We went though couple of options how to solve the issue and the first one is to add such existing patch [3] into current systemd-249.11-0ubuntu3.6. Could you comment whether this kind of non-security patch is likely to land in 22.04.1 LTS soon. We are able to help to bring patch into systemd package community way if you suggest the steps. [TESTING] On a Jammy system, create a bond interface with two subordinate devices. Assuming the interfaces ens3 and ens9 exist on the system, this can be done using the following: $ cat > /etc/netplan/bond.yaml << EOF network: version: 2 renderer: networkd ethernets: ens3: dhcp4: no ens9: dhcp4: no bonds: bond0: dhcp4: yes interfaces: - ens3 - ens9 parameters: mode: active-backup primary: ens3 EOF $ netplan generate && netplan apply From here, there are two tests that can be used to verify the fix. 1. Update the modification time of the generated network files, and call networkctl reload. From networkctl(1), when "reload" is called: [...] If a new, modified or removed .network file is found, then all interfaces which match the file are reconfigured. Hence, the following will trigger the desired code path: $ touch /run/systemd/network/* $ networkctl reload Without the fix, you can see in the logs the interfaces of the bond going up and down. With the fix, this should not happen. $ journalctl -b -u systemd-networkd.service --grep="Link DOWN" Finally, check that everything is back in the configured state: $ networkctl status 2. This bug can also be triggered by calling networkctl reconfigure directly. $ networkctl reconfigure ens3 $ networkctl reconfigure ens9 Check the logs that the links were not brought down: $ journalctl -b -u systemd-networkd.service --grep="Link DOWN" Finally, check that everything is back in the configured state: $ networkctl status [REGRESSION POTENTIAL] This patch is confined to the SET_LINK_MASTER logic for configuring links in systemd-networkd. While bond interfaces are the motivation for the fix, this early return applies for all interface types which SET_LINK_MASTER is supported, e.g. bridge interfaces as well. This logic has seen exercise in newer releases of systemd and Ubuntu without further modification, so I would not expect to see regressions for other interface types. Furthermore, the bond type is the only type where the link is set to down in order to configure the master interface index, so this call was already effectively a no-op for those other interface types. If any problems did occur, it would be related to (re-)configuring link types which have a master interface set. [OTHER] This fix requires two upstream patches: https://github.com/systemd/systemd/commit/9f913d37a0 https://github.com/systemd/systemd/commit/c3e12de0a6 The second is a follow-up to the first, to complete the fix. These patches do not apply cleanly to v249, so some trivial conflicts were resolved to make the patches apply. Additionally, some additional logic is added to the patches so that the link state is correctly set when this new branch is hit. Specifically, we decrement the set_link_messages counter, and call link_check_ready() before returning -EALREADY. This is necessary because the version of systemd where these patches originate from saw a lot of refactoring in this area of systemd-networkd since v249. So, while in newer versions of systemd, the message counter is handled correctly, and link_check_ready() is eventually called despite cancelling the SET_LINK_MASTER request, this never happens when these patches are applied to v249. Hence, we add the necessary steps to the patch. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2003250/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp