getumbrel / umbrel-os

umbrelOS for Raspberry Pi 4 (only). Covert your Raspberry Pi into a home server in one click. For other hardware, checkout https://github.com/getumbrel/umbrel
https://umbrel.com
BSD 3-Clause "New" or "Revised" License
583 stars 56 forks source link

Fix the waiting for the network #213

Closed AaronDewes closed 2 years ago

AaronDewes commented 3 years ago

network.target doesn't do anything without this.

lukechilds commented 3 years ago

Booting this OS image with the network cable unplugged, gives this in the logs:

umbrel@umbrel:~ $ journalctl -u umbrel-startup.service
-- Logs begin at Sat 2021-04-24 10:28:14 UTC, end at Sun 2021-04-25 11:17:26 UTC. --
Apr 24 10:30:18 umbrel systemd[1]: Starting Umbrel Startup Service...
Apr 24 10:30:18 umbrel umbrel startup[1438]: ======================================
Apr 24 10:30:18 umbrel umbrel startup[1438]: ============= STARTING ===============
Apr 24 10:30:18 umbrel umbrel startup[1438]: ============== UMBREL ================
Apr 24 10:30:18 umbrel umbrel startup[1438]: ======================================
Apr 24 10:30:18 umbrel umbrel startup[1438]: Setting environment variables...
Apr 24 10:30:18 umbrel umbrel startup[1438]: RTNETLINK answers: Network is unreachable
Apr 24 10:30:18 umbrel systemd[1]: umbrel-startup.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Apr 24 10:30:18 umbrel systemd[1]: umbrel-startup.service: Failed with result 'exit-code'.
Apr 24 10:30:18 umbrel systemd[1]: Failed to start Umbrel Startup Service.
Apr 24 10:30:29 umbrel systemd[1]: umbrel-startup.service: Service RestartSec=10s expired, scheduling restart.
Apr 24 10:30:29 umbrel systemd[1]: umbrel-startup.service: Scheduled restart job, restart counter is at 1.
Apr 24 10:30:29 umbrel systemd[1]: Stopped Umbrel Startup Service.
Apr 24 10:30:29 umbrel systemd[1]: Starting Umbrel Startup Service...
Apr 24 10:30:29 umbrel umbrel startup[1505]: ======================================
Apr 24 10:30:29 umbrel umbrel startup[1505]: ============= STARTING ===============
Apr 24 10:30:29 umbrel umbrel startup[1505]: ============== UMBREL ================
Apr 24 10:30:29 umbrel umbrel startup[1505]: ======================================
Apr 24 10:30:29 umbrel umbrel startup[1505]: Setting environment variables...
Apr 24 10:30:29 umbrel umbrel startup[1505]: RTNETLINK answers: Network is unreachable
Apr 24 10:30:29 umbrel systemd[1]: umbrel-startup.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Apr 24 10:30:29 umbrel systemd[1]: umbrel-startup.service: Failed with result 'exit-code'.
Apr 24 10:30:29 umbrel systemd[1]: Failed to start Umbrel Startup Service.
Apr 24 10:30:39 umbrel systemd[1]: umbrel-startup.service: Service RestartSec=10s expired, scheduling restart.
Apr 24 10:30:39 umbrel systemd[1]: umbrel-startup.service: Scheduled restart job, restart counter is at 2.
Apr 24 10:30:39 umbrel systemd[1]: Stopped Umbrel Startup Service.
Apr 24 10:30:39 umbrel systemd[1]: Starting Umbrel Startup Service...
Apr 24 10:30:39 umbrel umbrel startup[1571]: ======================================
Apr 24 10:30:39 umbrel umbrel startup[1571]: ============= STARTING ===============
Apr 24 10:30:39 umbrel umbrel startup[1571]: ============== UMBREL ================

The service is enabled if I check:

umbrel@umbrel:~ $ systemctl is-enabled systemd-networkd-wait-online.service
enabled

So it doesn't seem like this is actually causing the service to wait for the network.