From 562f963e19292521f353d48059cd65b629f9d834 Mon Sep 17 00:00:00 2001 From: rcooke-warwick Date: Wed, 14 Aug 2024 16:06:28 +0100 Subject: [PATCH] update-balena-supervisor: add network-online dependency There is a race condition present when purging a device and rebooting. If "update-balena-supervisor" comes up before the device can connect to the internet, it will fail to pull the supervisor image. As this service stops "balena-supervisor.service" , this isn't attempted again for at least 15 min = (up to 1 hour) when the "update-balena-supervisor.timer" triggers it. Change-type: patch Signed-off-by: Ryan Cooke --- .../balena-supervisor/update-balena-supervisor.service | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta-balena-common/recipes-containers/balena-supervisor/balena-supervisor/update-balena-supervisor.service b/meta-balena-common/recipes-containers/balena-supervisor/balena-supervisor/update-balena-supervisor.service index 55560e1e3b..6687295e85 100644 --- a/meta-balena-common/recipes-containers/balena-supervisor/balena-supervisor/update-balena-supervisor.service +++ b/meta-balena-common/recipes-containers/balena-supervisor/balena-supervisor/update-balena-supervisor.service @@ -3,7 +3,8 @@ Description=Balena supervisor updater Requires=\ balena.service \ bind-etc-balena-supervisor.service \ - tmp.mount + tmp.mount \ + network-online.target Wants=\ mnt-boot.mount \ balena-supervisor.service @@ -12,7 +13,8 @@ After=\ tmp.mount \ mnt-boot.mount \ bind-etc-balena-supervisor.service \ - balena-supervisor.service + balena-supervisor.service \ + network-online.target [Service] Type=simple