mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-26 02:26:30 +00:00
Add some issues and suggestion (#2557)
This commit is contained in:
parent
100cfb57c5
commit
9c33897296
@ -15,7 +15,7 @@ from .exceptions import (
|
|||||||
SupervisorUpdateError,
|
SupervisorUpdateError,
|
||||||
)
|
)
|
||||||
from .homeassistant.core import LANDINGPAGE
|
from .homeassistant.core import LANDINGPAGE
|
||||||
from .resolution.const import ContextType, IssueType, UnhealthyReason
|
from .resolution.const import ContextType, IssueType, SuggestionType, UnhealthyReason
|
||||||
|
|
||||||
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -213,6 +213,14 @@ class Core(CoreSysAttributes):
|
|||||||
else:
|
else:
|
||||||
_LOGGER.info("Skiping start of Home Assistant")
|
_LOGGER.info("Skiping start of Home Assistant")
|
||||||
|
|
||||||
|
# Core is not running
|
||||||
|
if self.sys_homeassistant.core.error_state:
|
||||||
|
self.sys_resolution.create_issue(
|
||||||
|
IssueType.FATAL_ERROR,
|
||||||
|
ContextType.CORE,
|
||||||
|
suggestions=[SuggestionType.EXECUTE_REPAIR],
|
||||||
|
)
|
||||||
|
|
||||||
# start addon mark as application
|
# start addon mark as application
|
||||||
await self.sys_addons.boot(AddonStartup.APPLICATION)
|
await self.sys_addons.boot(AddonStartup.APPLICATION)
|
||||||
|
|
||||||
|
@ -27,8 +27,9 @@ from ..const import (
|
|||||||
SECURITY_PROFILE,
|
SECURITY_PROFILE,
|
||||||
)
|
)
|
||||||
from ..coresys import CoreSys
|
from ..coresys import CoreSys
|
||||||
from ..exceptions import CoreDNSError, DockerError, HardwareNotFound
|
from ..exceptions import CoreDNSError, DockerError, DockerNotFound, HardwareNotFound
|
||||||
from ..hardware.const import PolicyGroup
|
from ..hardware.const import PolicyGroup
|
||||||
|
from ..resolution.const import ContextType, IssueType, SuggestionType
|
||||||
from ..utils import process_lock
|
from ..utils import process_lock
|
||||||
from .interface import DockerInterface
|
from .interface import DockerInterface
|
||||||
|
|
||||||
@ -370,6 +371,7 @@ class DockerAddon(DockerInterface):
|
|||||||
self._stop()
|
self._stop()
|
||||||
|
|
||||||
# Create & Run container
|
# Create & Run container
|
||||||
|
try:
|
||||||
docker_container = self.sys_docker.run(
|
docker_container = self.sys_docker.run(
|
||||||
self.image,
|
self.image,
|
||||||
tag=str(self.addon.version),
|
tag=str(self.addon.version),
|
||||||
@ -390,6 +392,14 @@ class DockerAddon(DockerInterface):
|
|||||||
volumes=self.volumes,
|
volumes=self.volumes,
|
||||||
tmpfs=self.tmpfs,
|
tmpfs=self.tmpfs,
|
||||||
)
|
)
|
||||||
|
except DockerNotFound:
|
||||||
|
self.sys_resolution.create_issue(
|
||||||
|
IssueType.MISSING_IMAGE,
|
||||||
|
ContextType.ADDON,
|
||||||
|
reference=self.addon.slug,
|
||||||
|
suggestion=[SuggestionType.EXECUTE_REPAIR],
|
||||||
|
)
|
||||||
|
raise
|
||||||
|
|
||||||
self._meta = docker_container.attrs
|
self._meta = docker_container.attrs
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user