For awareness, please note that according to the AI (Artificial
Intelligence) troubleshooting tool used, below is its response when
queried further:

What the dev said:

“This sounds like it's a bug in wireguard systemd units, and not systemd
itself, so I am re-assigning the package.”

This is referring specifically to the [email protected] unit files
that Ubuntu ships with WireGuard. Those units are what actually manage
bringing up the interface at boot. The “race” occurs when the unit tries
to start before networking is fully online, which is why your overrides
(After=network-online.target) or rc.local/delays work.

Why it looks like an OS issue:

The underlying OS (Ubuntu 24.04.3 LTS) provides systemd and the network
targets (network-online.target, systemd-networkd-wait-online.service,
etc.).

If network-online.target doesn’t reliably reflect the actual network
state due to a subtle timing issue in systemd or the cloud-init network
scripts, then it’s fair to say the OS contributes to the problem.

That’s why, before your workarounds, the NAT/forwarding rules and IP
assignment sometimes failed at boot.

Where the responsibility lies:

The root cause is interaction between WireGuard’s systemd unit and the
network-online.target dependency.

The bug is filed under systemd because at first glance, it looks like a
startup ordering problem.

Once you test the workarounds, it’s clear that modifying the WireGuard
unit fixes the race, which is why the developer reassigned it to
wireguard.

✅ Summary:

The dev is technically correct that the issue resides in how the
WireGuard unit is configured.

But it’s not 100% purely a WireGuard problem — the underlying
systemd/network-online handling can make the race more likely.

In other words, the OS provides the stage, but the WireGuard unit script
is the actor that trips up if the timing isn’t perfect.

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

Title:
  Race condition in systemd startup order causes WireGuard to fail at
  boot on Ubuntu 24.04.3 (Oracle Cloud image)

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


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

Reply via email to