From e55fc8f5afb1dbd11d1267ec38d662e9f2d2f704 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 20 Dec 2021 09:59:14 -0600 Subject: [PATCH] r/homeassistant et al.: Increase start timeout The first time launching a container after pulling a new image, it can take several minutes for the container to actually start. Podman has to set up the overlay filesystems, which is very slow on a Raspberry Pi. With the default start timeout, systemd may end up killing the process before the container is completely set up. Thus, we need to increase the timeout to ensure there is plenty of time for Podman to work. --- roles/homeassistant/templates/homeassistant.service.j2 | 1 + roles/zigbee2mqtt/templates/zigbee2mqtt.service.j2 | 1 + roles/zwavejs2mqtt/templates/zwavejs2mqtt.service.j2 | 1 + 3 files changed, 3 insertions(+) diff --git a/roles/homeassistant/templates/homeassistant.service.j2 b/roles/homeassistant/templates/homeassistant.service.j2 index 4a527e7..15a7d68 100644 --- a/roles/homeassistant/templates/homeassistant.service.j2 +++ b/roles/homeassistant/templates/homeassistant.service.j2 @@ -22,6 +22,7 @@ ExecStart=/usr/bin/podman run \ ghcr.io/home-assistant/{{ homeassistant_image_name }}:stable ProtectSystem=full UMask=0077 +TimeoutStartSec=5min [Install] WantedBy=multi-user.target diff --git a/roles/zigbee2mqtt/templates/zigbee2mqtt.service.j2 b/roles/zigbee2mqtt/templates/zigbee2mqtt.service.j2 index b1ba94f..e3282b3 100644 --- a/roles/zigbee2mqtt/templates/zigbee2mqtt.service.j2 +++ b/roles/zigbee2mqtt/templates/zigbee2mqtt.service.j2 @@ -24,6 +24,7 @@ ExecStart=/usr/bin/podman run \ docker.io/koenkk/zigbee2mqtt:latest ProtectSystem=full UMask=0077 +TimeoutStartSec=5min [Install] WantedBy=multi-user.target diff --git a/roles/zwavejs2mqtt/templates/zwavejs2mqtt.service.j2 b/roles/zwavejs2mqtt/templates/zwavejs2mqtt.service.j2 index d6cee35..bb71499 100644 --- a/roles/zwavejs2mqtt/templates/zwavejs2mqtt.service.j2 +++ b/roles/zwavejs2mqtt/templates/zwavejs2mqtt.service.j2 @@ -24,6 +24,7 @@ ExecStart=/usr/bin/podman run \ docker.io/zwavejs/zwavejs2mqtt:latest ProtectSystem=full UMask=0077 +TimeoutStartSec=5min [Install] WantedBy=multi-user.target