Broken Praefect configuration in gitlab-qa-mirror: missing PostgreSQL database

The Praefect configuration in this file is broken: https://gitlab.com/gitlab-org/gitlab-qa-mirror/-/blob/master/lib/gitlab/qa/scenario/test/integration/praefect.rb

Praefect needs to be configured to connect to a Postgres database and that information is missing in the setup code.

Discovered via https://gitlab.com/gitlab-org/gitlab-qa-mirror/pipelines/136705209

Suggested solution: if the test environment is a single Omnibus instance, consider connecting Praefect to the embedded Postgres server of Omnibus.

Manually create the database once:

gitlab-psql -d template1 -c 'CREATE DATABASE praefect_production OWNER git'

Then before the first reconfigure make sure Praefect gets configured to connect to that DB:

# in /etc/gitlab/gitlab.rb

praefect['database_host'] = '/var/opt/gitlab/postgresql'
praefect['database_user'] = 'git'
praefect['database_dbname'] = 'praefect_production'

That way you don't have to spin up a separate Postgres server just for Praefect.

/label group::gitaly