mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-25 18:16:32 +00:00
Tag installation type & more infos (#1887)
* Tag installation type & more infos * fix black * Make sure dbus is available for reports * HassOS warning -> info * Fix installation type name * fix correct ADR * change name * make message more friendly
This commit is contained in:
parent
f27a426879
commit
a51b80f456
@ -301,6 +301,8 @@ def setup_diagnostics(coresys: CoreSys) -> None:
|
|||||||
"channel": coresys.updater.channel,
|
"channel": coresys.updater.channel,
|
||||||
"supervisor": coresys.supervisor.version,
|
"supervisor": coresys.supervisor.version,
|
||||||
"os": coresys.hassos.version,
|
"os": coresys.hassos.version,
|
||||||
|
"host": coresys.host.info.operating_system,
|
||||||
|
"kernel": coresys.host.info.kernel,
|
||||||
"core": coresys.homeassistant.version,
|
"core": coresys.homeassistant.version,
|
||||||
"audio": coresys.plugins.audio.version,
|
"audio": coresys.plugins.audio.version,
|
||||||
"dns": coresys.plugins.dns.version,
|
"dns": coresys.plugins.dns.version,
|
||||||
@ -308,6 +310,10 @@ def setup_diagnostics(coresys: CoreSys) -> None:
|
|||||||
"cli": coresys.plugins.cli.version,
|
"cli": coresys.plugins.cli.version,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
scope.set_tag(
|
||||||
|
"installation_type",
|
||||||
|
f"{'os' if coresys.hassos.available else 'supervised'}",
|
||||||
|
)
|
||||||
|
|
||||||
return event
|
return event
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ FILE_HASSIO_MULTICAST = Path(SUPERVISOR_DATA, "multicast.json")
|
|||||||
|
|
||||||
MACHINE_ID = Path("/etc/machine-id")
|
MACHINE_ID = Path("/etc/machine-id")
|
||||||
SOCKET_DOCKER = Path("/run/docker.sock")
|
SOCKET_DOCKER = Path("/run/docker.sock")
|
||||||
|
SOCKET_DBUS = Path("/run/dbus/system_bus_socket")
|
||||||
|
|
||||||
DOCKER_NETWORK = "hassio"
|
DOCKER_NETWORK = "hassio"
|
||||||
DOCKER_NETWORK_MASK = ip_network("172.30.32.0/23")
|
DOCKER_NETWORK_MASK = ip_network("172.30.32.0/23")
|
||||||
|
@ -5,7 +5,7 @@ import logging
|
|||||||
|
|
||||||
import async_timeout
|
import async_timeout
|
||||||
|
|
||||||
from .const import AddonStartup, CoreStates
|
from .const import SOCKET_DBUS, AddonStartup, CoreStates
|
||||||
from .coresys import CoreSys, CoreSysAttributes
|
from .coresys import CoreSys, CoreSysAttributes
|
||||||
from .exceptions import HassioError, HomeAssistantError, SupervisorUpdateError
|
from .exceptions import HassioError, HomeAssistantError, SupervisorUpdateError
|
||||||
|
|
||||||
@ -47,6 +47,13 @@ class Core(CoreSysAttributes):
|
|||||||
|
|
||||||
self.sys_docker.info.check_requirements()
|
self.sys_docker.info.check_requirements()
|
||||||
|
|
||||||
|
# Dbus available
|
||||||
|
if not SOCKET_DBUS.exists():
|
||||||
|
self.healthy = False
|
||||||
|
_LOGGER.critical(
|
||||||
|
"DBus is required for Home Assistant. This system is not supported!"
|
||||||
|
)
|
||||||
|
|
||||||
# Check if system is healthy
|
# Check if system is healthy
|
||||||
if not self.healthy:
|
if not self.healthy:
|
||||||
_LOGGER.critical(
|
_LOGGER.critical(
|
||||||
|
@ -97,7 +97,7 @@ class HassOS(CoreSysAttributes):
|
|||||||
if cpe.get_product()[0] != "hassos":
|
if cpe.get_product()[0] != "hassos":
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
_LOGGER.warning("No Home Assistant Operating System found!")
|
_LOGGER.info("No Home Assistant Operating System found")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
self._available = True
|
self._available = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user