-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollback of Core not working correctly #4590
Comments
The easiest way to reproduce the issue with
The Supervisor doesn't seem to detect that crash:
|
Further investigation show that the Home Assistant Core container does not stop. The exit code is beeing set correctly (in Manually calling
After that I was able to reach Home Assistant Core correctly. |
When Home Assistant Core crashes (e.g. due to SIGILL, signal number 4) as caused by #101027) the container should exit. This makes sure that the exit code can be read by container orchistration software such as the Supervisor and act upon. With this, the Supervisor properly rolls back Home Assistant Core to the previously installed version. See also home-assistant/supervisor#4590 (comment).
When Home Assistant Core crashes (e.g. due to SIGILL, signal number 4 as caused by #101027) the container should exit. This makes sure that the exit code can be read by container orchistration software such as the Supervisor and act upon. With this, the Supervisor properly rolls back Home Assistant Core to the previously installed version. See also home-assistant/supervisor#4590 (comment).
Turns out this is an issue in the Core finish script. I've created a PR with home-assistant/core#101105. However, this does not address the freeze issue (which can be observed with |
The freeze issue is addressed with #4595. With this PR, updating to the above mentioned version leads to:
|
👋 Hi! Looks like some people have had some trouble with upgrading because of #4595; I know my Home Assistant installation can take well over 5 minutes to start due to some slow starting integrations. In my case, I currently can't upgrade to 2023.11.0b2 from 2023.11.0b1 because Supervisor rolls back the upgrade too quickly! Is there a way to manually choose to disable the 5 minute timeout? |
@caraar12345 thanks for bringing this up. It seems that the rollback is misstriggering here indeed!
No, this is a hardcoded timeout currently. However, by default, the Core itself should timeout as well if stage 1 doesn't complete within 2 minutes (see https://github.com/home-assistant/core/blob/dev/homeassistant/bootstrap.py#L65). The frontend integration, which provides the API the Supervisor is checking is part of stage 1. So I am not entirly sure what is happening here. Can you open a new issue along with the Supervisor and Core logs after an update attempt? Thanks a lot! |
That's really interesting context, thanks! Absolutely will raise another issue 👍 |
Describe the issue you are experiencing
When Home Assistant Core is broken (e.g. due to home-assistant/core#101027), the Supervisor should rollback to the previous version. It seems that the logic is not working correctly.
With
2023.10.0b0
this can be reproduced only on some x86-64 images. But it has previously been observed with2023.9.0.dev20230816
too, which failed on all platforms.What type of installation are you running?
Home Assistant OS
Which operating system are you running on?
Home Assistant Operating System
Steps to reproduce the issue
ha core update --version=<x.y>
Anything in the Supervisor logs that might be useful for us?
System Health information
This is after updating to 2023.10.0b0
System Information
Home Assistant Cloud
Home Assistant Supervisor
Dashboards
Recorder
Supervisor diagnostics
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: