Confirmed on noble. This is a regression from the networkd serialization backport for LP: #2098183. It affects 255.4-1ubuntu8.10 through 8.18; 8.8 is not affected.
Root cause: on startup, manager_deserialize() changes the existing addresses and routes from foreign to DHCPv4/NDisc. With KeepConfiguration=yes, the link's first configuration then calls link_drop_managed_config(). In v255 that removes everything that is not foreign, including the just-restored dynamic config. Each restart drops IPv4 for about 20 ms, the RA routes for about 1.5 s, and the SLAAC address for about 3.4 s while it redoes DAD. I don't believe the upstream references in the description fully fix this on v255. PR #36414 appears to address a separate v257 regression. In my testing, backporting the v256 cleanup changes (e09b7588, 8d01e44c) still drops SLAAC on every restart, and it changes reconfigure and carrier-loss behaviour. Upstream never combined serialization with the v255 cleanup logic, so I don't think there is a targeted fix to cherry- pick. A complete fix would also need the v257 reconfiguration rework (82df2e0f04), which seems too large for an SRU. Hence the Ubuntu- specific patch below. Proposed fix (attached): skip link_drop_managed_config() only on a link's first configuration when the new .network has KeepConfiguration=yes. At that point any non-foreign config can only have come from deserialization. Results in a VM with KeepConfiguration=true. Deletions per event, as IPv4 addr / IPv6 addr / DHCP routes / RA routes. (A container won't reproduce this: networkd configures links before deserialization when detect_container() is true.) version restart x3 reconfigure carrier loss stop 255.4-1ubuntu8.8 0/0/0/0 1/1/2/2 1/1/2/2 0/0/0/0 255.4-1ubuntu8.18 1/1/2/2 1/1/2/2 1/1/2/2 0/0/0/0 8.18 + attached patch 0/0/0/0 1/1/2/2 1/1/2/2 0/0/0/0 With KeepConfiguration unset, or with no matching .network, the patched build behaves the same as stock. Deserialized addresses and routes keep their DHCPv4/NDisc config source. ** Patch added: "3-lp2170677-networkd-keep-deserialized-config.patch" https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2170677/+attachment/6009846/+files/3-lp2170677-networkd-keep-deserialized-config.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2170677 Title: systemd-networkd restart drops DHCP config with KeepConfiguration=yes To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2170677/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
