mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-19 18:08:40 +00:00
Increase timeout waiting for Core API to work around 2025.12.x issues (#6404)
* Fix too short timeouts for Synology NAS With Home Assistant Core 2025.12.x updates available the STARTUP_API_RESPONSE_TIMEOUT that HA supervisor is willing to wait (before assuming a startup failure and rolling back the entire core update) seems to be too low on not-so-beefy hosts. The problem has been seen on Synology NAS machines running Home Assistant on the side (like in my case). I have doubled the timeout from 3 to 6 minutes and the upgrade to Core 2025.12.1 works on my Synology DS723+. My update took 4min 56s -- hence the timeout increase was proven necessary. * Fix tests for increased API Timeout * Increase the timeout to 10 minutes * Increase the timeout in tests --------- Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
This commit is contained in:
@@ -48,7 +48,7 @@ _LOGGER: logging.Logger = logging.getLogger(__name__)
|
||||
|
||||
SECONDS_BETWEEN_API_CHECKS: Final[int] = 5
|
||||
# Core Stage 1 and some wiggle room
|
||||
STARTUP_API_RESPONSE_TIMEOUT: Final[timedelta] = timedelta(minutes=3)
|
||||
STARTUP_API_RESPONSE_TIMEOUT: Final[timedelta] = timedelta(minutes=10)
|
||||
# All stages plus event start timeout and some wiggle rooom
|
||||
STARTUP_API_CHECK_RUNNING_TIMEOUT: Final[timedelta] = timedelta(minutes=15)
|
||||
# While database migration is running, the timeout will be extended
|
||||
|
||||
@@ -387,7 +387,7 @@ async def test_api_check_timeout(
|
||||
):
|
||||
await coresys.homeassistant.core.start()
|
||||
|
||||
assert coresys.homeassistant.api.get_api_state.call_count == 3
|
||||
assert coresys.homeassistant.api.get_api_state.call_count == 10
|
||||
assert (
|
||||
"No Home Assistant Core response, assuming a fatal startup error" in caplog.text
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user