Skip to content

Commit e5598f3

Browse files
committed
fix: drop Requires=ollama.service from mios-ollama-firstboot.service
The bootstrap's overlay-seed step iterates Quadlets alphabetically when running `enable --now <unit>`, so mios-ollama-firstboot.service fires BEFORE ollama.service in the same pass. With Requires=ollama. service the firstboot unit failed-fast on dependency-failed: [21:34:32] enable --now mios-ollama-firstboot.service [21:34:32] A dependency job for mios-ollama-firstboot.service failed. [21:34:39] start ollama.service # 7s LATER The unit's own ExecStart already polls `podman exec mios-ollama ollama list` for 50s and gracefully drops the sentinel even when ollama never comes up, so Wants= alone is sufficient -- the dependency-failed cascade was strictly downside. Keep After=ollama.service so when both ARE in the same boot/start batch systemd still serializes them in the right order.
1 parent 5dc7fe2 commit e5598f3

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

usr/lib/systemd/system/mios-ollama-firstboot.service

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ Documentation=https://ollama.com/
77
# done marks completion; deleting it forces a re-pull on next start.
88
After=ollama.service network-online.target
99
Wants=ollama.service network-online.target
10-
Requires=ollama.service
10+
# Requires=ollama.service was here -- removed because the bootstrap's
11+
# overlay-seed step `enable --now mios-ollama-firstboot.service` fires
12+
# BEFORE it `start ollama.service` (the order is alphabetical via
13+
# `for unit in $(ls ...); do enable --now $unit; done`). With Requires=
14+
# the firstboot unit failed-fast on dependency-failed instead of
15+
# waiting; the unit's own ExecStart polls `podman exec mios-ollama
16+
# ollama list` for 50s and gracefully marks the sentinel even if
17+
# ollama never comes up, so Wants= alone is sufficient.
1118
ConditionPathExists=!/var/lib/mios/.ollama-firstboot-done
1219
# Run on bare-metal/VM AND on WSL. systemd treats `wsl` as a container
1320
# variant, so a plain `!container` would skip every WSL deployment --

0 commit comments

Comments
 (0)