Skip to content

Fix missing gitlab-geo.conf when initiating replication

Nick Nguyen requested to merge nhxnguyen-5454 into master

What does this MR do?

In !4495 (merged), we updated gitlab-ctl replicate-geo-database to support changes to replication settings introduced by PostgreSQL 12.

However, the gitlab-geo.conf file that was created when a secondary is configured, would be erased when initiating replication, as that file does not exist on the primary. Further, because we had removed the open mode from File.open, the file was not created when it didn't exist. This results in an error when running gitlab-ctl replicate-geo-database with Postgres 12.

This MR creates and writes gitlab-geo.conf from replicate-geo-database and removes creation of the file from the recipe as that is not needed until replication is initiated.

Related issues

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for the GitLab Chart opened
Edited by Ian Baum

Merge request reports

Loading