DEVX-155: fix: use host Docker when root dir is inaccessible (free=0)
Post-merge / detect-and-configure (push) Canceled after 0s
Post-merge / release-and-maintain (push) Canceled after 0s

The CI container can't access the host Docker's data root
(/home/grm-ci-runner-X/.local/share/docker) to check disk space.
When free_bytes=0, the root dir is on the host filesystem (455G).
Always use host Docker in that case instead of starting a local
dockerd on the 16G /dev/shm tmpfs (which fills up with images).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
emil
2026-08-14 21:15:23 +02:00
co-authored by Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent d7c9b7fa94
commit 1470cdae27
2 changed files with 16 additions and 0 deletions
+10
View File
@@ -136,6 +136,16 @@ class TestStartDockerDaemon:
mock_ready.assert_called_once()
mock_diag.assert_called_once()
@patch("devx.molecule.start_docker._diagnose_socket")
@patch("devx.molecule.start_docker._get_docker_free_bytes", return_value=0)
@patch("devx.molecule.start_docker.is_docker_ready", return_value=True)
def test_host_socket_inaccessible_root_uses_host(
self, mock_ready: MagicMock, mock_free: MagicMock, mock_diag: MagicMock
) -> None:
"""Should use host Docker when root dir is inaccessible (free=0)."""
assert start_docker_daemon(timeout=5) is True
mock_ready.assert_called_once()
@patch("devx.molecule.start_docker._diagnose_socket")
@patch("devx.molecule.start_docker._get_docker_free_bytes", return_value=5 * 1024**3)
@patch("devx.molecule.start_docker.is_docker_ready", return_value=True)