From a0a4ee526e9f06d84e226fa97e6954844d883d2e Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 1 Nov 2018 09:46:52 +0200 Subject: [PATCH] Fix bug in Postgres dump/import causing upgrades to fail Regression since 3fd6fd647f85c --- roles/matrix-server/tasks/upgrade_postgres.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/matrix-server/tasks/upgrade_postgres.yml b/roles/matrix-server/tasks/upgrade_postgres.yml index e42353f1..0b1d262b 100644 --- a/roles/matrix-server/tasks/upgrade_postgres.yml +++ b/roles/matrix-server/tasks/upgrade_postgres.yml @@ -79,10 +79,10 @@ - name: Perform Postgres database dump command: | /usr/bin/docker run --rm --name matrix-postgres-dump \ - --link matrix-postgres:postgres \ + --network={{ matrix_docker_network }} \ --env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \ -v {{ postgres_dump_dir }}:/out \ - {{ matrix_postgres_docker_image_to_use }} pg_dump -h postgres {{ matrix_postgres_db_name }} -f /out/{{ postgres_dump_name }} + {{ matrix_postgres_docker_image_to_use }} pg_dump -h matrix-postgres {{ matrix_postgres_db_name }} -f /out/{{ postgres_dump_name }} - name: Ensure matrix-postgres is stopped service: name=matrix-postgres state=stopped @@ -107,10 +107,10 @@ - name: Perform Postgres database import command: | /usr/bin/docker run --rm --name matrix-postgres-import \ - --link matrix-postgres:postgres \ + --network={{ matrix_docker_network }} \ --env-file={{ matrix_environment_variables_data_path }}/env-postgres-pgsql-docker \ -v {{ postgres_dump_dir }}:/in:ro \ - {{ matrix_postgres_docker_image_latest }} psql -h postgres -f /in/{{ postgres_dump_name }} + {{ matrix_postgres_docker_image_latest }} psql -h matrix-postgres -f /in/{{ postgres_dump_name }} - name: Delete Postgres database dump file file: