From 49cb8b7b11a72bb44cfa3227350f4dcbb29188df Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 15 May 2023 07:33:26 +0300 Subject: [PATCH] Add Synapse main/master process to instance map Related to https://github.com/matrix-org/synapse/pull/15491 This doesn't hurt to be done early on, while still on Synapse v1.83.0. We'll be able to remove the `worker_replication_*` settings later, when Synapse v1.84.0 gets released and starts making use of the new `main` instance in the instance map instead of looking at the `worker_replication_*` settings. --- roles/custom/matrix-synapse/defaults/main.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index a1719461d..5a5e9978d 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -711,9 +711,18 @@ matrix_synapse_run_background_tasks_on: "{{ (matrix_synapse_workers_enabled_list # - { 'id': 'media-repository-0', 'name': 'matrix-synapse-worker-media-repository-0', 'type': 'media_repository', 'port': 18551, 'metrics_port': 19551, 'webserving': true } matrix_synapse_workers_enabled_list: [] -# matrix_synapse_instance_map holds the instance map used for mapping worker names (for certain generic workers only!) to where they live (host, port which handles replication traffic). -# This is populated automatically based on `matrix_synapse_workers_enabled_list` during runtime, so you're not required to tweak it manually. -matrix_synapse_instance_map: {} +# matrix_synapse_instance_map holds the instance map used for mapping worker names (for the main process and certain generic workers only!) to where they live (host, port which handles replication traffic). +# This map starts off being populated with the Synapse main (master) process, +# but will be populated with workers automatically during runtime, based on `matrix_synapse_workers_enabled_list`. +matrix_synapse_instance_map: | + {{ + { + 'main': { + 'host': 'matrix-synapse', + 'port': matrix_synapse_replication_http_port, + }, + } + }} # Redis information matrix_synapse_redis_enabled: false