mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-03-31 12:14:13 +03:00
fix(mas): keep Synapse stopped after syn2mas migration
Avoid reopening a transition window where Synapse can accept new registrations or other auth changes after syn2mas completes but before the MAS cutover is finalized. Inspired by and continuing the work done in: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/5097
This commit is contained in:
@@ -398,6 +398,8 @@ To perform a real migration, run the `matrix-authentication-service-mas-cli-syn2
|
||||
just run-tags matrix-authentication-service-mas-cli-syn2mas
|
||||
```
|
||||
|
||||
After `syn2mas` completes, Synapse will intentionally remain stopped to avoid new registrations or other authentication changes from being accepted before the migration is completed. Continue with the next steps in this guide before re-running the installation.
|
||||
|
||||
Having performed a `syn2mas` migration once, trying to do it again will report errors (e.g. "Error: The MAS database is not empty: rows found in at least `users`. Please drop and recreate the database, then try again.").
|
||||
|
||||
## Verify that Matrix Authentication Service is installed correctly
|
||||
|
||||
@@ -110,11 +110,17 @@
|
||||
ansible.builtin.debug:
|
||||
var: matrix_authentication_service_mas_cli_syn2mas_command_result
|
||||
|
||||
- name: Ensure Synapse is started (if it previously was)
|
||||
- name: Inject syn2mas post-migration note
|
||||
when: "not matrix_authentication_service_syn2mas_migrate_dry_run and matrix_authentication_service_mas_cli_syn2mas_command_result.changed"
|
||||
ansible.builtin.service:
|
||||
name: matrix-synapse
|
||||
state: started
|
||||
ansible.builtin.set_fact:
|
||||
devture_playbook_runtime_messages_list: |
|
||||
{{
|
||||
devture_playbook_runtime_messages_list | default([])
|
||||
+
|
||||
[
|
||||
"Synapse was intentionally not restarted after `syn2mas`. Continue with the next steps in the Matrix Authentication Service migration guide before re-running the installation."
|
||||
]
|
||||
}}
|
||||
|
||||
- name: Ensure Matrix Authentication Service is started (if it previously was)
|
||||
when: "not matrix_authentication_service_syn2mas_migrate_dry_run and matrix_authentication_service_mas_ensure_stopped_result.changed"
|
||||
|
||||
Reference in New Issue
Block a user