mirror of
https://github.com/home-assistant/operating-system.git
synced 2026-08-28 00:44:20 +01:00
Dropbear has no ordering relationship to haos-supervisor.service or docker.service, so systemd schedules all three stop jobs in the same batch and runs them concurrently. Dropbear exits within milliseconds while the Supervisor gets up to 450s to stop containers, which means an SSH session is dropped right when the interesting part of shutdown starts. That makes it needlessly hard to debug slow shutdowns. Order Dropbear before both units. Since stop order is the reverse of start order, systemd now stops it only once the Supervisor and Docker are gone. This is an ordering-only dependency: if Dropbear fails, is masked or is skipped by its ConditionFileNotEmpty=, the ordering counts as satisfied and both units start as before. It adds no boot latency either, as docker.service already waits for the overlay partition that Dropbear needs for /etc/dropbear. Verified on a generic-x86-64 VM: an SSH session now survives the full 22.4s Supervisor teardown, and systemd stops Dropbear last, 3ms after docker.service is gone. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>