Stopping the core goes through several stages, which can take up to 120s, 60s and 30s respectively. However, if shutdown is taking longer than 60s overall, s6 isn't patient and kills the core: Jan 10 23:56:58 homeassistant eb034fca9c7d[407]: s6-svwait: fatal: timed out Jan 10 23:56:58 homeassistant eb034fca9c7d[407]: [s6-finish] sending all processes the TERM signal. Jan 10 23:57:01 homeassistant eb034fca9c7d[407]: [s6-finish] sending all processes the KILL signal and exiting. This is most of the time not a problem since shutdown is quicker than that. However, increasing the timeout is especialy useful to debug cases when an event is hanging, since the core will point it out after its timeout elapsed. Set the timeout to 220s, which is all core timeouts plus 10s grace time.
22 lines
578 B
Docker
22 lines
578 B
Docker
ARG BUILD_FROM
|
|
FROM ${BUILD_FROM}
|
|
|
|
# Synchronize with homeassistant/core.py:async_stop
|
|
ENV \
|
|
S6_SERVICES_GRACETIME=220000
|
|
|
|
WORKDIR /usr/src
|
|
|
|
## Setup Home Assistant
|
|
COPY . homeassistant/
|
|
RUN \
|
|
pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
|
|
-r homeassistant/requirements_all.txt \
|
|
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
|
|
-e ./homeassistant \
|
|
&& python3 -m compileall homeassistant/homeassistant
|
|
|
|
# Home Assistant S6-Overlay
|
|
COPY rootfs /
|
|
|
|
WORKDIR /config
|