I investigated this on Noble with systemd 255.4-1ubuntu8.17 and
reproduced the nginx bind failure during a combined nginx/systemd-
networkd restart, including a restart initiated by needrestart after a
library upgrade.

The reproduction uses nginx bound to a specific SLAAC IPv6 address. A
temporary one-second ExecStartPre delay makes the race reproducible.
Address monitoring shows networkd deleting the address during restart;
nginx then fails with EADDRNOTAVAIL before IPv6 becomes usable again.
This reproduces the reported failure mechanism, although the original
report mentions DHCPv6.

The source investigation points to systemd-networkd: Noble restores
address/route source metadata, but initial configuration subsequently
reclassifies dynamic configuration as foreign, allowing cleanup to
remove it.

Relevant upstream changes are:
- dd6d53a8dc58c5e6e310b09ba7f7a22600a87ba9, which removes this foreignization 
step:
  
https://github.com/systemd/systemd/commit/dd6d53a8dc58c5e6e310b09ba7f7a22600a87ba9
- 82df2e0f0496834064f32e4f09cc32728c1cbddd, which includes cleanup of restored 
configuration when dynamic protocols are disabled:
  
https://github.com/systemd/systemd/commit/82df2e0f0496834064f32e4f09cc32728c1cbddd

The same nginx reproduction did not fail on Resolute with systemd
259.5-0ubuntu3.4, and no address deletion was observed.

A targeted experimental Noble adaptation passes the nginx reproduction,
while an unpatched control built with identical options fails. Three
integration tests also pass, covering DHCPv4/DHCPv6/SLAAC address
preservation across restart and cleanup when DHCP/RA are disabled.

Noble still needs a reviewed fix. The upstream changes do not apply
directly to its older code, so the appropriate minimal backport remains
under review; the experimental patch is not yet an SRU-ready package.

Adding a systemd task and targeting Noble. Closing the unattended-
upgrades task as Invalid because the reproduced defect lies in
networkd’s restart handling.

** Also affects: systemd (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: systemd (Ubuntu)
       Status: New => Triaged

** Changed in: unattended-upgrades (Ubuntu)
       Status: Triaged => Invalid

** Changed in: unattended-upgrades (Ubuntu)
       Status: Invalid => Won't Fix

** Changed in: systemd (Ubuntu)
     Assignee: (unassigned) => Zara Grigoryan (zgrigoryan)

** Also affects: unattended-upgrades (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: systemd (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Changed in: unattended-upgrades (Ubuntu)
   Importance: Medium => Undecided

** Changed in: systemd (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2067057

Title:
  Unattended-upgrades order of restart caused failure to bind address

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2067057/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to