From 00969a67ac63e01f0199471d315bfee22bf36676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Thu, 13 Aug 2020 10:44:45 +0200 Subject: [PATCH] Set not supported with wrong docker configuration (#1904) * set not supported with wrong docker configuration * Set not supported if no access to udev monitor * Move flag --- supervisor/core.py | 4 +++- supervisor/docker/__init__.py | 2 ++ supervisor/misc/hwmon.py | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/supervisor/core.py b/supervisor/core.py index 505804d05..85e441f5e 100644 --- a/supervisor/core.py +++ b/supervisor/core.py @@ -42,7 +42,9 @@ class Core(CoreSysAttributes): _LOGGER.error( "Detected Docker running inside LXC. Running Home Assistant with the Supervisor on LXC is not supported!" ) - self.sys_docker.info.check_requirements() + + if self.sys_docker.info.check_requirements(): + self.coresys.supported = False # Dbus available if not SOCKET_DBUS.exists(): diff --git a/supervisor/docker/__init__.py b/supervisor/docker/__init__.py index 985b73c56..859d32504 100644 --- a/supervisor/docker/__init__.py +++ b/supervisor/docker/__init__.py @@ -60,6 +60,8 @@ class DockerInfo: if self.logging != "journald": _LOGGER.error("Docker logging driver %s is not supported!", self.logging) + return self.storage != "overlay2" or self.logging != "journald" + class DockerAPI: """Docker Supervisor wrapper. diff --git a/supervisor/misc/hwmon.py b/supervisor/misc/hwmon.py index 2d6ebf469..db6c6dab5 100644 --- a/supervisor/misc/hwmon.py +++ b/supervisor/misc/hwmon.py @@ -28,6 +28,7 @@ class HwMonitor(CoreSysAttributes): self.monitor = pyudev.Monitor.from_netlink(self.context) self.observer = pyudev.MonitorObserver(self.monitor, self._udev_events) except OSError: + self.coresys.supported = False _LOGGER.critical("Not privileged to run udev monitor!") else: self.observer.start()