Upgrade Synapse (1.31 -> 1.32.2)

This commit is contained in:
Slavi Pantaleev 2021-04-22 14:22:07 +03:00
parent 378fabf177
commit e3fa3e12bc
6 changed files with 59 additions and 22 deletions

View File

@ -297,7 +297,7 @@ matrix_coturn_enabled: false
# hundreds of servers inside is insanely heavy (https://github.com/matrix-org/synapse/issues/3971). # hundreds of servers inside is insanely heavy (https://github.com/matrix-org/synapse/issues/3971).
# #
# If your server does not federate with hundreds of others, enabling this doesn't hurt much. # If your server does not federate with hundreds of others, enabling this doesn't hurt much.
matrix_synapse_use_presence: false matrix_synapse_presence_enabled: false
``` ```
You can also consider implementing a restriction on room complexity, in order to prevent users from joining very heavy rooms: You can also consider implementing a restriction on room complexity, in order to prevent users from joining very heavy rooms:

View File

@ -74,7 +74,7 @@ You should then be able to browse the adminer database administration GUI at htt
## Make Synapse faster ## Make Synapse faster
Synapse's presence feature which tracks which users are online and which are offline can use a lot of processing power. You can disable presence by adding `matrix_synapse_use_presence: false` to your `vars.yml` file. Synapse's presence feature which tracks which users are online and which are offline can use a lot of processing power. You can disable presence by adding `matrix_synapse_presence_enabled: false` to your `vars.yml` file.
Tuning Synapse's cache factor can help reduce RAM usage. [See the upstream documentation](https://github.com/matrix-org/synapse#help-synapse-is-slow-and-eats-all-my-ram-cpu) for more information on what value to set the cache factor to. Use the variable `matrix_synapse_caches_global_factor` to set the cache factor. Tuning Synapse's cache factor can help reduce RAM usage. [See the upstream documentation](https://github.com/matrix-org/synapse#help-synapse-is-slow-and-eats-all-my-ram-cpu) for more information on what value to set the cache factor to. Use the variable `matrix_synapse_caches_global_factor` to set the cache factor.

View File

@ -64,7 +64,7 @@ matrix_appservice_discord_enabled: false
matrix_appservice_discord_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9005' }}" matrix_appservice_discord_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9005' }}"
# If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
matrix_appservice_discord_bridge_disablePresence: "{{ matrix_synapse_use_presence }}" matrix_appservice_discord_bridge_disablePresence: "{{ not matrix_synapse_presence_enabled }}"
matrix_appservice_discord_systemd_required_services_list: | matrix_appservice_discord_systemd_required_services_list: |
{{ {{
@ -188,7 +188,7 @@ matrix_appservice_irc_container_http_host_bind_port: "{{ '' if matrix_nginx_prox
# The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
# IRC bridge presence, for performance reasons. # IRC bridge presence, for performance reasons.
matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_use_presence }}" matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled }}"
matrix_appservice_irc_systemd_required_services_list: | matrix_appservice_irc_systemd_required_services_list: |
{{ {{
@ -242,7 +242,7 @@ matrix_mautrix_facebook_homeserver_token: "{{ matrix_synapse_macaroon_secret_key
matrix_mautrix_facebook_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}" matrix_mautrix_facebook_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_use_presence if matrix_synapse_enabled else true }}" matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
# We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
# and point them to a migration path. # and point them to a migration path.
@ -325,7 +325,7 @@ matrix_mautrix_instagram_homeserver_token: "{{ matrix_synapse_macaroon_secret_ke
matrix_mautrix_instagram_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}" matrix_mautrix_instagram_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
matrix_mautrix_instagram_bridge_presence: "{{ matrix_synapse_use_presence if matrix_synapse_enabled else true }}" matrix_mautrix_instagram_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
# We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
# and point them to a migration path. # and point them to a migration path.
@ -1211,7 +1211,7 @@ matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ m
matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}" matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
matrix_nginx_proxy_synapse_presence_disabled: "{{ not matrix_synapse_use_presence }}" matrix_nginx_proxy_synapse_presence_disabled: "{{ not matrix_synapse_presence_enabled }}"
matrix_nginx_proxy_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}" matrix_nginx_proxy_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
matrix_nginx_proxy_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}" matrix_nginx_proxy_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
@ -1527,7 +1527,7 @@ matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registrati
matrix_client_element_enable_presence_by_hs_url: | matrix_client_element_enable_presence_by_hs_url: |
{{ {{
none none
if matrix_synapse_use_presence if matrix_synapse_presence_enabled
else {matrix_client_element_default_hs_url: false} else {matrix_client_element_default_hs_url: false}
}} }}

View File

@ -15,8 +15,8 @@ matrix_synapse_docker_image_name_prefix: "{{ 'localhost/' if matrix_synapse_cont
# amd64 gets released first. # amd64 gets released first.
# arm32 relies on self-building, so the same version can be built immediately. # arm32 relies on self-building, so the same version can be built immediately.
# arm64 users need to wait for a prebuilt image to become available. # arm64 users need to wait for a prebuilt image to become available.
matrix_synapse_version: v1.31.0 matrix_synapse_version: v1.32.2
matrix_synapse_version_arm64: v1.31.0 matrix_synapse_version_arm64: v1.32.2
matrix_synapse_docker_image_tag: "{{ matrix_synapse_version if matrix_architecture in ['arm32', 'amd64'] else matrix_synapse_version_arm64 }}" matrix_synapse_docker_image_tag: "{{ matrix_synapse_version if matrix_architecture in ['arm32', 'amd64'] else matrix_synapse_version_arm64 }}"
matrix_synapse_docker_image_force_pull: "{{ matrix_synapse_docker_image.endswith(':latest') }}" matrix_synapse_docker_image_force_pull: "{{ matrix_synapse_docker_image.endswith(':latest') }}"
@ -170,7 +170,7 @@ matrix_synapse_report_stats: false
# Controls whether the Matrix server will track presence status (online, offline, unavailable) for users. # Controls whether the Matrix server will track presence status (online, offline, unavailable) for users.
# If users participate in large rooms with many other servers, # If users participate in large rooms with many other servers,
# disabling this will decrease server load significantly. # disabling this will decrease server load significantly.
matrix_synapse_use_presence: true matrix_synapse_presence_enabled: true
# Controls whether accessing the server's public rooms directory can be done without authentication. # Controls whether accessing the server's public rooms directory can be done without authentication.
# For private servers, you most likely wish to require authentication, # For private servers, you most likely wish to require authentication,

View File

@ -47,6 +47,7 @@
- {'old': 'matrix_synapse_container_expose_metrics_port', 'new': '<superseded by matrix_synapse_container_metrics_api_host_bind_port>'} - {'old': 'matrix_synapse_container_expose_metrics_port', 'new': '<superseded by matrix_synapse_container_metrics_api_host_bind_port>'}
- {'old': 'matrix_synapse_cache_factor', 'new': 'matrix_synapse_caches_global_factor'} - {'old': 'matrix_synapse_cache_factor', 'new': 'matrix_synapse_caches_global_factor'}
- {'old': 'matrix_synapse_trusted_third_party_id_servers', 'new': '<deprecated in Synapse v0.99.4 and removed in Synapse v1.19.0>'} - {'old': 'matrix_synapse_trusted_third_party_id_servers', 'new': '<deprecated in Synapse v0.99.4 and removed in Synapse v1.19.0>'}
- {'old': 'matrix_synapse_use_presence', 'new': 'matrix_synapse_presence_enabled'}
- name: (Deprecation) Catch and report renamed settings in matrix_synapse_configuration_extension_yaml - name: (Deprecation) Catch and report renamed settings in matrix_synapse_configuration_extension_yaml
fail: fail:

View File

@ -58,9 +58,28 @@ public_baseurl: https://{{ matrix_server_fqn_matrix }}/
# #
#soft_file_limit: 0 #soft_file_limit: 0
# Set to false to disable presence tracking on this homeserver. # Presence tracking allows users to see the state (e.g online/offline)
# of other local and remote users.
# #
use_presence: {{ matrix_synapse_use_presence|to_json }} presence:
# Uncomment to disable presence tracking on this homeserver. This option
# replaces the previous top-level 'use_presence' option.
#
enabled: {{ matrix_synapse_presence_enabled|to_json }}
# Presence routers are third-party modules that can specify additional logic
# to where presence updates from users are routed.
#
presence_router:
# The custom module's class. Uncomment to use a custom presence router module.
#
#module: "my_custom_router.PresenceRouter"
# Configuration options of the custom module. Refer to your module's
# documentation for available options.
#
#config:
# example_option: 'something'
# Whether to require authentication to retrieve profile data (avatars, # Whether to require authentication to retrieve profile data (avatars,
# display names) of other users through the client API. Defaults to # display names) of other users through the client API. Defaults to
@ -1252,9 +1271,9 @@ registrations_require_3pid: {{ matrix_synapse_registrations_require_3pid|to_json
# #
#allowed_local_3pids: #allowed_local_3pids:
# - medium: email # - medium: email
# pattern: '.*@matrix\.org' # pattern: '^[^@]+@matrix\.org$'
# - medium: email # - medium: email
# pattern: '.*@vector\.im' # pattern: '^[^@]+@vector\.im$'
# - medium: msisdn # - medium: msisdn
# pattern: '\+44' # pattern: '\+44'
{% if matrix_synapse_allowed_local_3pids|length > 0 %} {% if matrix_synapse_allowed_local_3pids|length > 0 %}
@ -1467,14 +1486,31 @@ report_stats: {{ matrix_synapse_report_stats|to_json }}
## API Configuration ## ## API Configuration ##
# A list of event types that will be included in the room_invite_state # Controls for the state that is shared with users who receive an invite
# to a room
# #
#room_invite_state_types: room_prejoin_state:
# - "m.room.join_rules" # By default, the following state event types are shared with users who
# - "m.room.canonical_alias" # receive invites to the room:
# - "m.room.avatar" #
# - "m.room.encryption" # - m.room.join_rules
# - "m.room.name" # - m.room.canonical_alias
# - m.room.avatar
# - m.room.encryption
# - m.room.name
#
# Uncomment the following to disable these defaults (so that only the event
# types listed in 'additional_event_types' are shared). Defaults to 'false'.
#
#disable_default_event_types: true
# Additional state event types to share with users when they are invited
# to a room.
#
# By default, this list is empty (so only the default event types are shared).
#
#additional_event_types:
# - org.example.custom.event.type
# A list of application service config files to use # A list of application service config files to use