mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 12:29:08 +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:
@@ -12,6 +12,8 @@ from supervisor.docker.homeassistant import DockerHomeAssistant
|
||||
from supervisor.docker.manager import DockerAPI
|
||||
from supervisor.homeassistant.const import LANDINGPAGE
|
||||
|
||||
from . import DEV_MOUNT
|
||||
|
||||
|
||||
async def test_homeassistant_start(
|
||||
coresys: CoreSys, tmp_supervisor_data: Path, path_extern
|
||||
@@ -42,7 +44,7 @@ async def test_homeassistant_start(
|
||||
"HASSIO_TOKEN": ANY,
|
||||
}
|
||||
assert run.call_args.kwargs["mounts"] == [
|
||||
Mount(type="bind", source="/dev", target="/dev", read_only=True),
|
||||
DEV_MOUNT,
|
||||
Mount(type="bind", source="/run/dbus", target="/run/dbus", read_only=True),
|
||||
Mount(type="bind", source="/run/udev", target="/run/udev", read_only=True),
|
||||
Mount(
|
||||
@@ -128,7 +130,7 @@ async def test_landingpage_start(
|
||||
"HASSIO_TOKEN": ANY,
|
||||
}
|
||||
assert run.call_args.kwargs["mounts"] == [
|
||||
Mount(type="bind", source="/dev", target="/dev", read_only=True),
|
||||
DEV_MOUNT,
|
||||
Mount(type="bind", source="/run/dbus", target="/run/dbus", read_only=True),
|
||||
Mount(type="bind", source="/run/udev", target="/run/udev", read_only=True),
|
||||
Mount(
|
||||
|
||||
Reference in New Issue
Block a user