mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-27 19:16:29 +00:00
Fix issue with mark system wrong as rollback (#2345)
This commit is contained in:
parent
1d43236211
commit
dee2998ee3
@ -66,19 +66,26 @@ class Core(CoreSysAttributes):
|
|||||||
await self.sys_resolution.evaluate.evaluate_system()
|
await self.sys_resolution.evaluate.evaluate_system()
|
||||||
|
|
||||||
# Check supervisor version/update
|
# Check supervisor version/update
|
||||||
if self.sys_dev:
|
if self.sys_config.version == self.sys_supervisor.version:
|
||||||
self.sys_config.version = self.sys_supervisor.version
|
return
|
||||||
elif self.sys_config.version != self.sys_supervisor.version:
|
|
||||||
self.sys_resolution.create_issue(
|
# Somethings going wrong
|
||||||
IssueType.UPDATE_ROLLBACK, ContextType.SUPERVISOR
|
|
||||||
)
|
|
||||||
self.sys_resolution.unhealthy = UnhealthyReason.SUPERVISOR
|
|
||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
"Update '%s' of Supervisor '%s' failed!",
|
"Update '%s' of Supervisor '%s' failed!",
|
||||||
self.sys_config.version,
|
self.sys_config.version,
|
||||||
self.sys_supervisor.version,
|
self.sys_supervisor.version,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.sys_supervisor.need_update:
|
||||||
|
self.sys_resolution.create_issue(
|
||||||
|
IssueType.UPDATE_ROLLBACK, ContextType.SUPERVISOR
|
||||||
|
)
|
||||||
|
self.sys_resolution.unhealthy = UnhealthyReason.SUPERVISOR
|
||||||
|
|
||||||
|
# Fix wrong version in config / avoid boot loop on OS
|
||||||
|
self.sys_config.version = self.sys_supervisor.version
|
||||||
|
self.sys_config.save_data()
|
||||||
|
|
||||||
async def setup(self):
|
async def setup(self):
|
||||||
"""Start setting up supervisor orchestration."""
|
"""Start setting up supervisor orchestration."""
|
||||||
self.state = CoreState.SETUP
|
self.state = CoreState.SETUP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user