synapse workers: supply systemd with actual worker PIDs (requires jq)

also, worker.yaml.j2:
  - hone worker_name
  - remove worker_pid_file entry (would only be used if worker_daemonize
    set to true; also, synapse only knows about the container namespace
    and thus can not provide the required host-view PID)
This commit is contained in:
Marcel Partap
2020-10-22 20:53:41 +02:00
parent d2e61af224
commit 501efee07e
5 changed files with 50 additions and 6 deletions

View File

@ -40,3 +40,9 @@
{{ matrix_synapse_systemd_wanted_services_list +
['matrix-synapse-worker@' + item.worker + ':' + item.port|string + '.service'] }}
with_items: "{{ matrix_synapse_workers_enabled_list }}"
- name: Ensure matrix-synapse-worker-write-pid script is created
copy:
src: "{{ role_path }}/files/usr-local-bin/matrix-synapse-worker-write-pid"
dest: "{{ matrix_local_bin_path }}/matrix-synapse-worker-write-pid"
mode: 0750

View File

@ -36,3 +36,8 @@
- name: Ensure systemd noticed removal of worker service units
service:
daemon_reload: yes
- name: Ensure matrix-synapse-worker-write-pid script is removed
file:
path: "{{ matrix_local_bin_path }}/matrix-synapse-worker-write-pid"
state: absent