From ddb8588d7748e3c8efbaa63c1be0183fa657b555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Thu, 9 Oct 2025 18:47:06 +0200 Subject: [PATCH] Treat containerd snapshotter/overlayfs driver as supported (#6242) * Treat containerd snapshotter/overlayfs driver as supported With home-assistant/operating-system#4252 the storage driver would change to "overlayfs". We don't want the system to be marked as unsupported. It should be safe to treat it as supported even now, so add it to the list of allowed values. * Flip the logic (note for self: don't forget to check for unstaged changes before push) * Set valid storage for invalid logging test case --- .../resolution/evaluations/docker_configuration.py | 10 +++++++--- .../evaluation/test_evaluate_docker_configuration.py | 9 +++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/supervisor/resolution/evaluations/docker_configuration.py b/supervisor/resolution/evaluations/docker_configuration.py index e074dee7d..84f62eaae 100644 --- a/supervisor/resolution/evaluations/docker_configuration.py +++ b/supervisor/resolution/evaluations/docker_configuration.py @@ -8,7 +8,7 @@ from ..const import UnsupportedReason from .base import EvaluateBase EXPECTED_LOGGING = "journald" -EXPECTED_STORAGE = "overlay2" +EXPECTED_STORAGE = ("overlay2", "overlayfs") _LOGGER: logging.Logger = logging.getLogger(__name__) @@ -41,14 +41,18 @@ class EvaluateDockerConfiguration(EvaluateBase): storage_driver = self.sys_docker.info.storage logging_driver = self.sys_docker.info.logging - if storage_driver != EXPECTED_STORAGE: + is_unsupported = False + + if storage_driver not in EXPECTED_STORAGE: + is_unsupported = True _LOGGER.warning( "Docker storage driver %s is not supported!", storage_driver ) if logging_driver != EXPECTED_LOGGING: + is_unsupported = True _LOGGER.warning( "Docker logging driver %s is not supported!", logging_driver ) - return storage_driver != EXPECTED_STORAGE or logging_driver != EXPECTED_LOGGING + return is_unsupported diff --git a/tests/resolution/evaluation/test_evaluate_docker_configuration.py b/tests/resolution/evaluation/test_evaluate_docker_configuration.py index b098085c5..20f011b10 100644 --- a/tests/resolution/evaluation/test_evaluate_docker_configuration.py +++ b/tests/resolution/evaluation/test_evaluate_docker_configuration.py @@ -25,13 +25,18 @@ async def test_evaluation(coresys: CoreSys): assert docker_configuration.reason in coresys.resolution.unsupported coresys.resolution.unsupported.clear() - coresys.docker.info.storage = EXPECTED_STORAGE + coresys.docker.info.storage = EXPECTED_STORAGE[0] coresys.docker.info.logging = "unsupported" await docker_configuration() assert docker_configuration.reason in coresys.resolution.unsupported coresys.resolution.unsupported.clear() - coresys.docker.info.storage = EXPECTED_STORAGE + coresys.docker.info.storage = "overlay2" + coresys.docker.info.logging = EXPECTED_LOGGING + await docker_configuration() + assert docker_configuration.reason not in coresys.resolution.unsupported + + coresys.docker.info.storage = "overlayfs" coresys.docker.info.logging = EXPECTED_LOGGING await docker_configuration() assert docker_configuration.reason not in coresys.resolution.unsupported