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
This commit is contained in:
Joakim Sørensen 2020-08-13 10:44:45 +02:00 committed by GitHub
parent a374d4e817
commit 00969a67ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -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():

View File

@ -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.

View File

@ -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()