debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #09294
[Bug 2128680] Re: Race condition in systemd startup order causes WireGuard to fail at boot on Ubuntu 24.04.3 (Oracle Cloud image)
This sounds like it's a bug in wireguard systemd units, and not systemd
itself, so I am re-assigning the package.
** Package changed: systemd (Ubuntu) => wireguard (Ubuntu)
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to systemd in 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)
Status in Ubuntu:
New
Status in wireguard package in Ubuntu:
New
Bug description:
There appears to be a race condition during boot on Ubuntu 24.04.3 LTS
(GNU/Linux 6.14.0-1013-oracle x86_64), where wg-quick@wg0.service
starts before the network is fully up, resulting in intermittent
WireGuard initialization failures.
Observed behavior:
wg-quick@wg0.service fails on cold boots.
Manually restarting the service (systemctl restart wg-quick@wg0) after
boot succeeds.
Journal logs suggest that network-online.target has not yet been
reached when wg-quick@wg0 starts.
Environment:
Ubuntu 24.04.3 LTS (Oracle Cloud image)
Linux kernel 6.14.0-1013-oracle
WireGuard installed via apt
netfilter-persistent active (firewall rules applied at boot)
Steps to reproduce:
Create a standard WireGuard interface (wg0.conf under
/etc/wireguard/).
Enable the service:
sudo systemctl enable wg-quick@wg0
Reboot the system.
Observe that wg show returns “interface not found” after boot,
requiring a manual restart.
Additional context:
A community discussion identified this as a systemd startup order race condition between network-online.target, firewall initialization, and WireGuard.
See discussion and diagnostics here:
👉 https://discourse.ubuntu.com/t/suspected-race-condition-error-in-systemd-startup-order/69668
Workarounds tested:
Adding After=network-online.target and ExecStartPre dependency to the
unit file (partial success).
Introducing an artificial delay using ExecStartPre=/bin/sleep 10
(works reliably, but not ideal).
Using a systemd override dependency or custom rc.local script to
restart wg-quick@wg0 after networking (works consistently).
These resolve the symptom but not the root cause.
A long-term fix may require adjusting default dependency ordering between network-online.target and wg-quick@.service or related cloud-init/systemd-networkd units on Oracle Cloud images.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/2128680/+subscriptions
References