Replace the hardcoded /volume1 path with a matrix_base_synology_volume_path variable (defaulting to /volume1), used both by the setup-time prerequisites task and by the boot-fix recovery script. This keeps the path consistent with the rest of the configuration and lets users on a non-default Docker storage volume override it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>pull/5315/head
| @@ -210,6 +210,11 @@ matrix_synology_user_password: "" | |||||
| # system Python interpreter (ansible_python_interpreter) on the remote host. | # system Python interpreter (ansible_python_interpreter) on the remote host. | ||||
| matrix_base_synology_requests_version_constraint: "requests<2.32" | matrix_base_synology_requests_version_constraint: "requests<2.32" | ||||
| # Synology volume that needs shared mount propagation so that Docker | |||||
| # bind-propagation=slave mounts (used by matrix-synapse for its media store) | |||||
| # work correctly. Defaults to /volume1 (DSM's default Docker storage volume). | |||||
| matrix_base_synology_volume_path: "/volume1" | |||||
| matrix_base_data_path: "/matrix" | matrix_base_data_path: "/matrix" | ||||
| matrix_base_data_path_mode: "750" | matrix_base_data_path_mode: "750" | ||||
| @@ -13,8 +13,8 @@ | |||||
| # step. The boot-fix service handles this on every subsequent reboot. | # step. The boot-fix service handles this on every subsequent reboot. | ||||
| # noqa command-instead-of-module: ansible.builtin.mount does not support | # noqa command-instead-of-module: ansible.builtin.mount does not support | ||||
| # changing mount propagation (--make-shared); command is the only option here. | # changing mount propagation (--make-shared); command is the only option here. | ||||
| - name: Ensure /volume1 has shared mount propagation (Synology) | |||||
| ansible.builtin.command: mount --make-shared /volume1 # noqa command-instead-of-module | |||||
| - name: Ensure the Synology volume has shared mount propagation | |||||
| ansible.builtin.command: mount --make-shared {{ matrix_base_synology_volume_path }} # noqa command-instead-of-module | |||||
| changed_when: false | changed_when: false | ||||
| - ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_synology_boot_fix.yml" | - ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_synology_boot_fix.yml" | ||||
| @@ -8,7 +8,7 @@ | |||||
| # This script runs after multi-user.target (outside Container Manager's dependency | # This script runs after multi-user.target (outside Container Manager's dependency | ||||
| # chain) and does two things: | # chain) and does two things: | ||||
| # | # | ||||
| # 1. Makes /volume1 mount-shared so Docker bind-propagation=slave mounts work. | |||||
| # 1. Makes {{ matrix_base_synology_volume_path }} mount-shared so Docker bind-propagation=slave mounts work. | |||||
| # Inserting this into the systemd chain Before=pkg-ContainerManager-dockerd.service | # Inserting this into the systemd chain Before=pkg-ContainerManager-dockerd.service | ||||
| # causes Container Manager to detect a broken dependency and prompt for repair, | # causes Container Manager to detect a broken dependency and prompt for repair, | ||||
| # so it must run here instead, after Docker is already up. | # so it must run here instead, after Docker is already up. | ||||
| @@ -32,12 +32,12 @@ if ! {{ devture_systemd_docker_base_host_command_docker }} info >/dev/null 2>&1; | |||||
| exit 1 | exit 1 | ||||
| fi | fi | ||||
| # Make /volume1 shared so Docker bind-propagation=slave mounts work correctly. | |||||
| # Make {{ matrix_base_synology_volume_path }} shared so Docker bind-propagation=slave mounts work correctly. | |||||
| # Must run after Docker is up to avoid interfering with Container Manager's | # Must run after Docker is up to avoid interfering with Container Manager's | ||||
| # integrity checks, but before matrix-synapse (and any other service using | # integrity checks, but before matrix-synapse (and any other service using | ||||
| # bind-propagation=slave) creates its containers. | # bind-propagation=slave) creates its containers. | ||||
| /bin/mount --make-shared /volume1 | |||||
| echo "matrix-synology-boot-fix: /volume1 set to shared mount propagation" | |||||
| /bin/mount --make-shared {{ matrix_base_synology_volume_path }} | |||||
| echo "matrix-synology-boot-fix: {{ matrix_base_synology_volume_path }} set to shared mount propagation" | |||||
| # Start any enabled matrix-*.service that is inactive or failed. | # Start any enabled matrix-*.service that is inactive or failed. | ||||
| # Both states indicate the service did not come up at boot — either skipped by | # Both states indicate the service did not come up at boot — either skipped by | ||||