Przeglądaj źródła

Make postgres_start_wait_time (affecting upgrades) configurable

This also raises the default from 5 seconds to 15 seconds.
pull/27/head
Slavi Pantaleev 7 lat temu
rodzic
commit
4c0970d31e
1 zmienionych plików z 9 dodań i 3 usunięć
  1. +9
    -3
      roles/matrix-server/tasks/upgrade_postgres.yml

+ 9
- 3
roles/matrix-server/tasks/upgrade_postgres.yml Wyświetl plik

@@ -10,10 +10,16 @@
postgres_dump_name: "matrix-postgres.out" postgres_dump_name: "matrix-postgres.out"
when: "postgres_dump_name|default('') == ''" when: "postgres_dump_name|default('') == ''"


- set_fact:
- name: Set postgres_auto_upgrade_backup_data_path, if not provided
set_fact:
postgres_auto_upgrade_backup_data_path: "{{ matrix_postgres_data_path }}-auto-upgrade-backup" postgres_auto_upgrade_backup_data_path: "{{ matrix_postgres_data_path }}-auto-upgrade-backup"
when: "postgres_auto_upgrade_backup_data_path|default('') == ''" when: "postgres_auto_upgrade_backup_data_path|default('') == ''"


- name: Set postgres_start_wait_time, if not provided
set_fact:
postgres_start_wait_time: 15
when: "postgres_start_wait_time|default('') == ''"

- name: Fail, if trying to upgrade external Postgres database - name: Fail, if trying to upgrade external Postgres database
fail: fail:
msg: "Your configuration indicates that you're using an external Postgres database. Refusing to try and upgrade that." msg: "Your configuration indicates that you're using an external Postgres database. Refusing to try and upgrade that."
@@ -80,7 +86,7 @@


- name: Wait a bit, so that Postgres can start - name: Wait a bit, so that Postgres can start
wait_for: wait_for:
timeout: 5
timeout: "{{ postgres_start_wait_time }}"
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
become: false become: false


@@ -108,7 +114,7 @@


- name: Wait a bit, so that Postgres can start - name: Wait a bit, so that Postgres can start
wait_for: wait_for:
timeout: 5
timeout: "{{ postgres_start_wait_time }}"
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
become: false become: false




Ładowanie…
Anuluj
Zapisz