Remove worker pidfiles, not needed as result of removing synchrotron-balancer

This commit is contained in:
uumas
2023-04-19 15:27:01 +03:00
parent 0f86bfbc02
commit e8696ea656
3 changed files with 10 additions and 17 deletions

View File

@@ -27,26 +27,22 @@
synapse_worker_services: [] synapse_worker_services: []
synapse_synchrotrons: [] synapse_synchrotrons: []
- name: Ensure worker pidfile dir in /run exists
ansible.builtin.file:
path: /run/matrix-synapse/
state: directory
owner: matrix-synapse
group: nogroup
mode: 0755
- name: Ensure tmpfiles config for pidfile dir in place
ansible.builtin.template:
src: tmpfiles-matrix-synapse.conf.j2
dest: /etc/tmpfiles.d/matrix-synapse.conf
mode: 0644
- name: Configure workers - name: Configure workers
ansible.builtin.include_tasks: worker_type.yml ansible.builtin.include_tasks: worker_type.yml
loop: "{{ synapse_workers | dict2items }}" loop: "{{ synapse_workers | dict2items }}"
loop_control: loop_control:
loop_var: synapse_worker loop_var: synapse_worker
- name: Ensure worker pidfile dir in /run not present (legacy)
ansible.builtin.file:
path: /run/matrix-synapse/
state: absent
- name: Ensure tmpfiles config for pidfile dir not present (legacy)
ansible.builtin.file:
path: /etc/tmpfiles.d/matrix-synapse.conf
state: absent
- name: Ensure synchrotron balancer removed (legacy) - name: Ensure synchrotron balancer removed (legacy)
ansible.builtin.include_tasks: matrix-synchrotrons.yml ansible.builtin.include_tasks: matrix-synchrotrons.yml
when: synapse_synchrotrons | length != 0 when: synapse_synchrotrons | length != 0

View File

@@ -10,12 +10,10 @@ After=matrix-synapse.service
[Service] [Service]
Type=notify Type=notify
NotifyAccess=main NotifyAccess=main
PIDFile=/run/matrix-synapse/%i.pid
User=matrix-synapse User=matrix-synapse
WorkingDirectory=/var/lib/matrix-synapse WorkingDirectory=/var/lib/matrix-synapse
EnvironmentFile=-/etc/default/matrix-synapse EnvironmentFile=-/etc/default/matrix-synapse
ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.generic_worker --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --config-path=/etc/matrix-synapse/workers/%i.yaml ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.generic_worker --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --config-path=/etc/matrix-synapse/workers/%i.yaml
ExecStartPost=/bin/sh -c "echo $MAINPID > /run/matrix-synapse/%i.pid"
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=always Restart=always
RestartSec=3 RestartSec=3

View File

@@ -1 +0,0 @@
d /run/matrix-synapse 0755 matrix-synapse nogroup - -