Decouples gitlab-psql home_dir from postgres config_dir

This change decouples gitlab-psql's home directory from Postgres' config_directory.

For our implementation of v11, these were the same (/var/opt/gitlab/postgresql). For the upgrade to v12, we needed to support coexisting v11 and v12 configuration files. Thus, the upgrade tooling, which was Ansible-based, used the data12 directory.

This was later updated in Chef (to var/opt/gitlab/postgresql/data12). This created various problems:

  • it set gitlab-psql's home directory to data12
  • this annoyed Patroni and Postgres, which expect and empty data directory

Postgresthe v12 upgrade procedure used the On v12, we moved to using a specific data12` directory, which was required for the upgrade, and had to move the configuration file there so it would not conflict with v11's.

This broke Chef's ability to provision v12 from scratch. We therefore need to decouple them.

This MR does that, but, for environments where they're not, it falls back to the old behavior.

This is MR:

Edited by Gerardo Lopez-Fernandez

Merge request reports

Loading