From 7d6b00ea4a16cead59b2637341ca378fd28ca332 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 11 Aug 2020 18:02:25 +0200 Subject: [PATCH] Fix dev outside stable channel (#1891) * Fix dev outside stable channel * more friendly * downgrade logger for sentry * Show critical on the end --- supervisor/core.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/supervisor/core.py b/supervisor/core.py index 9cb2ee400..468b20bab 100644 --- a/supervisor/core.py +++ b/supervisor/core.py @@ -33,13 +33,13 @@ class Core(CoreSysAttributes): # If host docker is supported? if not self.sys_docker.info.supported_version: self.coresys.supported = False - _LOGGER.critical( + _LOGGER.error( "Docker version %s is not supported by Supervisor!", self.sys_docker.info.version, ) elif self.sys_docker.info.inside_lxc: self.coresys.supported = False - _LOGGER.critical( + _LOGGER.error( "Detected Docker running inside LXC. Running Home Assistant with the Supervisor on LXC is not supported!" ) self.sys_docker.info.check_requirements() @@ -47,16 +47,25 @@ class Core(CoreSysAttributes): # Dbus available if not SOCKET_DBUS.exists(): self.coresys.supported = False - _LOGGER.critical( + _LOGGER.error( "DBus is required for Home Assistant. This system is not supported!" ) # If a update is failed? if self.sys_dev: self.sys_config.version = self.sys_supervisor.version + elif self.sys_config.version == "dev": + _LOGGER.warning( + "Found a development supervisor outside dev channel (%s)", + self.sys_updater.channel, + ) elif self.sys_config.version != self.sys_supervisor.version: self._healthy = False - _LOGGER.critical("Update of Supervisor fails!") + _LOGGER.error( + "Update %s of Supervisor %s fails!", + self.sys_config.version, + self.sys_supervisor.version, + ) async def setup(self): """Start setting up supervisor orchestration.""" @@ -108,9 +117,11 @@ class Core(CoreSysAttributes): await self.sys_secrets.load() # Check if system is healthy - if not self.healthy: + if not self.sys_supported: + _LOGGER.critical("System running in a unsupported environment!") + elif not self.healthy: _LOGGER.critical( - "System running in a unhealthy state. Please update you OS or software!" + "System running in a unhealthy state and need manual intervention!" ) async def start(self):