failover/boot: mask networkd-wait-online instead of RequiredForOnline=no

The previous fix (RequiredForOnline=no on the ZT link) could not work and the
~2min boot stall returned. systemd-networkd-wait-online (systemd 255) only
declares the network online when at least one managed, online-eligible link
goes routable. networkd here manages only the AP (wlxc…, local-only) and the ZT
overlay — and with the ZT link also marked RequiredForOnline=no (on top of the
AP link that already was), wait-online had zero candidate links and could never
satisfy "online", burning its full 120s timeout every boot. Journal confirmed:
"Timeout occurred while waiting for network connectivity" at exactly +120s,
gating network-online.target → zerotier-one (the recovery path).

Mask systemd-networkd-wait-online entirely — neither networkd link is a real
uplink, and real uplink readiness is already covered by NetworkManager-wait-online.
Wire the mask into deploy.sh, delete the now-dead RequiredForOnline=no drop-in,
and correct README §3/§5.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Andreas Wrede
2026-06-28 20:57:21 -04:00
co-authored by Claude Opus 4.8
parent 118f2f2f5e
commit 387375de1e
3 changed files with 7 additions and 11 deletions
+5 -2
View File
@@ -27,8 +27,7 @@ install -D -m0755 failover/50-disable-eee /etc/NetworkManager/dispatcher.d
install -D -m0644 failover/99-van-arp.conf /etc/sysctl.d/99-van-arp.conf
echo "== zerotier managed dns =="
install -D -m0644 dns/zt-search.conf /etc/systemd/network/99-ztuga7c2kh.network.d/search.conf
install -D -m0644 dns/zt-required-for-online.conf /etc/systemd/network/99-ztuga7c2kh.network.d/required-for-online.conf
install -D -m0644 dns/zt-search.conf /etc/systemd/network/99-ztuga7c2kh.network.d/search.conf
echo "== cockpit plugin =="
install -d /usr/share/cockpit/vanrouter
@@ -37,6 +36,10 @@ install -m0644 cockpit/vanrouter/* /usr/share/cockpit/vanrouter/
echo "== apply =="
sysctl --system >/dev/null
systemctl daemon-reload
# networkd here owns only the AP + ZT overlay (neither a real uplink), so its wait-online
# can never satisfy "online" and just burns its 120s timeout, stalling network-online.target
# and ZeroTier by ~2min every boot. Real uplink readiness is covered by NetworkManager-wait-online.
systemctl mask systemd-networkd-wait-online.service >/dev/null 2>&1 || true
systemctl unmask hostapd >/dev/null 2>&1 || true
systemctl enable regdomain.service hostapd van-ap-dnsmasq nftables systemd-networkd van-failover >/dev/null 2>&1 || true
# restart in dependency order; AP iface IP first, then hostapd/dnsmasq, then NAT/failover