mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-10-01 06:03:30 +01:00
a806e3240626fa941dabde2df240b8a20b72cf73
In #7189 a manual POST /core/start during app boot produced a Core that could not bind its own port: the boot flow in Core.start() still held the transient systemd socket reserving it, and only that flow knew how to release it. #7194 closed the API vector by rejecting such calls while Supervisor is not RUNNING, but the guarantee then rests on the API gate rather than on the reservation itself -- any new or ungated path that starts Core reopens the race. Move the reservation onto HomeAssistantCore, which owns the container it protects. reserve_port() is called by the boot flow as before; release_port() is now also called by HomeAssistantCore.start() and restart() right before the container is started, so whichever path gets to Core first gives the port back. rebuild(), update() and the watchdog all funnel through those two. release_port() is a no-op unless a reservation is actually held, so the common case adds no D-Bus traffic. The boot flow keeps its explicit release after the services phase so application-phase apps see the same behavior as before when Core boot is disabled, and its finally block still acts as the backstop. Tests for the systemd interaction move alongside the code to tests/homeassistant/test_core.py; the boot-ordering tests in tests/test_core.py stay and are adapted to the new API. New tests cover start() and restart() releasing a held reservation before the container is touched, start() with no reservation not touching systemd, and start() proceeding when the release cannot be confirmed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…
…
Home Assistant Supervisor
First private cloud solution for home automation
Home Assistant (former Hass.io) is a container-based system for managing your Home Assistant Core installation and related applications. The system is controlled via Home Assistant which communicates with the Supervisor. The Supervisor provides an API to manage the installation. This includes changing network settings or installing and updating software.
Installation
Installation instructions can be found at https://home-assistant.io/getting-started.
Development
For small changes and bugfixes you can just follow this, but for significant changes open a RFC first. Development instructions can be found here.
Release
Releases are done in 3 stages (channels) with this structure:
- Pull requests are merged to the
mainbranch. - A new build is pushed to the
devstage. - Releases are published.
- A new build is pushed to the
betastage. - The
stable.jsonfile is updated. - The build that was pushed to
betawill now be pushed tostable.
Languages
Python
96.3%
JavaScript
3.6%
