mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 20:35:55 +00:00
08f10c96ef0a2c6de3141b1f3de7488219aac04d
When boot slot is selected manually in GRUB, the system boots into this slot and marks it as good. However, the boot order is not changed, so in the next boot (after an explicit or unexpected reboot) HAOS returns to the version in the other slot. This might be confusing because if the system has been running for some time, the user can forget they have changed the boot slot to fix issue they had. This gets more confusing if the "other" boot slot is selected manually three times in a row. Let's say we have ORDER="A B". This means that every time GRUB starts, it wants to boot slot A. If the slot B is selected instead, only A_TRY is incremented, system boots into slot B and marks slot B as good (B_OK=1, B_TRY=0). On another boot, this repeats, yet A_TRY is incremented again. Until it reaches 3, the slot A would be always chosen automatically, only after that it would boot to slot B, presuming slot A is dead. The ORDER variable will be still unchanged though. This commit only makes sure that when the system is marked as healthy, the slot is both marked as good AND active, updating the ORDER variable as well. Because the X_TRY counter is incremented by GRUB, if we want the other slot not to be marked as bad, we need to adjust the logic in OS's grub.cfg as well, because Supervisor can't know whether it's apppropriate to change other slot's state or not. I also took the courtesy to adjust the logging a bit, to include the stack trace in the error log if marking the slot fails somehow.
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.
Description
Languages
Python
95.2%
JavaScript
4.7%