mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-25 04:46:25 +00:00
Fix submounts of /dev being read-only with Docker 25+ (#4997)
As described in #4996, Docker 25+ changes made sub-mounts of the /dev filesystem to be mounted read-only. Revert to the previous behavior by adjusting the ReadOnlyNonRecursive option. Cleaner way would be to upstream support for setting this option via Mount class arguments, so this change is meant to be rather a hotfix for the issue. Even better approach would be mounting /dev non-recursively, and taking care of creating all necessary filesystems when creating containers in Supervisor.
This commit is contained in:
@@ -9,6 +9,8 @@ from docker.types import Mount
|
||||
from supervisor.coresys import CoreSys
|
||||
from supervisor.docker.manager import DockerAPI
|
||||
|
||||
from . import DEV_MOUNT
|
||||
|
||||
|
||||
async def test_start(coresys: CoreSys, tmp_supervisor_data: Path, path_extern):
|
||||
"""Test starting audio plugin."""
|
||||
@@ -26,8 +28,9 @@ async def test_start(coresys: CoreSys, tmp_supervisor_data: Path, path_extern):
|
||||
assert run.call_args.kwargs["ulimits"] == [
|
||||
{"Name": "rtprio", "Soft": 10, "Hard": 10}
|
||||
]
|
||||
|
||||
assert run.call_args.kwargs["mounts"] == [
|
||||
Mount(type="bind", source="/dev", target="/dev", read_only=True),
|
||||
DEV_MOUNT,
|
||||
Mount(
|
||||
type="bind",
|
||||
source=coresys.config.path_extern_audio.as_posix(),
|
||||
|
||||
Reference in New Issue
Block a user