Files
platform-core/infrastructure/host/systemd/systemd-time-wait-sync.service.d/10-timeout.conf
T
DongHyeonka 03ed6719b0 feat(host): start k3s only after the clock is synchronized
The desktop dual-boots Windows, which writes local time (KST) to the
RTC, while Ubuntu reads the RTC as UTC. On 2026-11-11 the boot started
9 hours ahead; k3s issued its certificates at that time, timesyncd
then set the clock back, the certificates were not yet valid, and
every Ingress returned 502 until k3s was restarted by hand.

Add a k3s.service drop-in with Wants= and After=time-sync.target, and
a drop-in that caps systemd-time-wait-sync.service at 10 minutes.
Enabling systemd-time-wait-sync makes time-sync.target wait for the
first NTP sync; its packaged TimeoutStartSec=infinity would keep k3s
down forever when NTP is unreachable, so after 10 minutes it fails,
the target is reached anyway and k3s starts as it does today.

Risk: the order only applies at boot, so nothing changes until the
next reboot. If NTP is down at boot, k3s starts 10 minutes later. The
Windows side still writes local time until RealTimeIsUniversal is set
there; the host guide covers that step.

Verification: systemd-analyze verify passes for k3s.service and
systemd-time-wait-sync.service with the drop-ins, and an unknown key
added to each drop-in is reported, so both files are read.
2026-11-12 07:28:03 +09:00

6 lines
262 B
Plaintext

# The packaged unit waits forever (TimeoutStartSec=infinity). If NTP is not
# reachable at boot, k3s would never start. After 10 minutes this unit fails,
# time-sync.target is reached anyway, and k3s starts with the clock it has.
[Service]
TimeoutStartSec=10min