mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-06-20 17:06:30 +00:00
Fix propagation mode of mounts to allow Ha-Core to start (#4374)
* Fix propagation mode of mounts to allow Ha-Core to start Change the mount propagation mode from SLAVE to RSLAVE in case of /media and /share * Check /share and /media to use RSLAVE as a propagation mode of mount * Fix mount propagation mode of /share and /media * Check /share and /media for rslave propagation mode
This commit is contained in:
parent
9504eff889
commit
5d1ef34f17
@ -387,7 +387,7 @@ class DockerAddon(DockerInterface):
|
||||
source=self.sys_config.path_extern_share.as_posix(),
|
||||
target="/share",
|
||||
read_only=addon_mapping[MAP_SHARE],
|
||||
propagation=PropagationMode.SLAVE.value,
|
||||
propagation=PropagationMode.RSLAVE.value,
|
||||
)
|
||||
)
|
||||
|
||||
@ -398,7 +398,7 @@ class DockerAddon(DockerInterface):
|
||||
source=self.sys_config.path_extern_media.as_posix(),
|
||||
target="/media",
|
||||
read_only=addon_mapping[MAP_MEDIA],
|
||||
propagation=PropagationMode.SLAVE.value,
|
||||
propagation=PropagationMode.RSLAVE.value,
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -97,14 +97,14 @@ class DockerHomeAssistant(DockerInterface):
|
||||
source=self.sys_config.path_extern_share.as_posix(),
|
||||
target="/share",
|
||||
read_only=False,
|
||||
propagation=PropagationMode.SLAVE.value,
|
||||
propagation=PropagationMode.RSLAVE.value,
|
||||
),
|
||||
Mount(
|
||||
type=MountType.BIND.value,
|
||||
source=self.sys_config.path_extern_media.as_posix(),
|
||||
target="/media",
|
||||
read_only=False,
|
||||
propagation=PropagationMode.SLAVE.value,
|
||||
propagation=PropagationMode.RSLAVE.value,
|
||||
),
|
||||
# Configuration audio
|
||||
Mount(
|
||||
|
@ -12,7 +12,7 @@ from .base import CheckBase
|
||||
def _check_container(container: DockerInterface) -> bool:
|
||||
"""Return true if container has a config issue."""
|
||||
return any(
|
||||
mount.get("Propagation") != PropagationMode.SLAVE.value
|
||||
mount.get("Propagation") != PropagationMode.RSLAVE.value
|
||||
for mount in container.meta_mounts
|
||||
if mount.get("Destination") in ["/media", "/share"]
|
||||
)
|
||||
|
@ -121,7 +121,7 @@ def test_addon_map_folder_defaults(
|
||||
source=coresys.config.path_extern_media.as_posix(),
|
||||
target="/media",
|
||||
read_only=True,
|
||||
propagation="slave",
|
||||
propagation="rslave",
|
||||
)
|
||||
in docker_addon.mounts
|
||||
)
|
||||
@ -133,7 +133,7 @@ def test_addon_map_folder_defaults(
|
||||
source=coresys.config.path_extern_share.as_posix(),
|
||||
target="/share",
|
||||
read_only=True,
|
||||
propagation="slave",
|
||||
propagation="rslave",
|
||||
)
|
||||
in docker_addon.mounts
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user