GEO: replicate-geo-database does not honor postgresql['data_dir']
Summary
Running replicate-geo-database does not honor postgresql['data_dir']. It moves the old data directory to /var/opt/gitlab/postgresql/data.xxxxxxxx instead of the path specified in postgresql['data_dir']. It then creates a new data directory at /var/opt/gitlab/postgresql/data.
Steps to reproduce
- Set up secondary Geo node
- Set
postgresql['data_dir']ingitlab.rb. - Run
replicate-geo-database.
What is the current bug behavior?
The old data directory is not moved to the directory specified in postgresql['data_dir']. And a new /var/opt/gitlab/postgresql/data is created.
What is the expected correct behavior?
Old data directory should be moved to the directory specified in postgresql['data_dir']. And the new data directory should be created at the directory specified in postgresql['data_dir'].
Relevant logs and/or screenshots
* Checking for replication slot secondary_example
* Backing up postgresql.conf
* Moving old data directory to '/var/opt/gitlab/postgresql/data.1526335006'
* Starting base backup as the replicator user (gitlab_replicator)
pg_basebackup: initiating base backup, waiting for checkpoint to complete
pg_basebackup: checkpoint completed
transaction log start point: D8/D7000028 on timeline 1
pg_basebackup: starting background WAL receiver
46360/46360 kB (100%), 1/1 tablespace
transaction log end point: D8/D70000F8
pg_basebackup: waiting for background process to finish streaming ...
pg_basebackup: base backup completed
* Writing recovery.conf file with sslmode=disable
* Restoring postgresql.conf
* Setting ownership permissions in PostgreSQL data directory
* Starting PostgreSQL and all GitLab services
Customer ticket -> https://gitlab.zendesk.com/agent/tickets/96205 (internal)
Version
10.5.6-ee
Edited by Aric Buerer