Check if supervisor run priv (#1993)

This commit is contained in:
Pascal Vizeli 2020-08-29 11:35:15 +02:00 committed by GitHub
parent f937876a1b
commit 58b88a6919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -45,6 +45,10 @@ class Core(CoreSysAttributes):
_LOGGER.error(
"Detected Docker running inside LXC. Running Home Assistant with the Supervisor on LXC is not supported!"
)
elif not self.sys_supervisor.instance.privileged:
self.supported = False
self.healthy = False
_LOGGER.error("Supervisor does not run in Privileged mode.")
if self.sys_docker.info.check_requirements():
self.supported = False

View File

@ -41,12 +41,6 @@ class Supervisor(CoreSysAttributes):
with suppress(DockerAPIError):
await self.instance.cleanup()
# Check privileged mode
if not self.instance.privileged:
_LOGGER.error(
"Supervisor does not run in Privileged mode. Hassio runs with limited functionality!"
)
@property
def ip_address(self) -> IPv4Address:
"""Return IP of Supervisor instance."""