Allow main_clusterwide with database_tasks: false
When setting up a second cell, we want to setup
the main_clusterwide
db with database_tasks: false
with a different host
However validate database config fails because of this.
Steps to reproduce
- Create a new GDK using
./support/cells-add-secondary
- In the new GDK, run
GITLAB_VALIDATE_DATABASE_CONFIG=1 bundle exec rake gitlab:db:validate_config
rake aborted!
Database config validation failure:
- The 'main_clusterwide' since it is using 'database_tasks: false' should share database with 'main:'.
Use `export GITLAB_VALIDATE_DATABASE_CONFIG=0` to ignore this validation.
/Users/tkuah/code/gdk2/gitlab/lib/tasks/gitlab/db/validate_config.rake:103:in `block (3 levels) in <main>'
/Users/tkuah/.rbenv/versions/3.1.4/bin/bundle:25:in `load'
/Users/tkuah/.rbenv/versions/3.1.4/bin/bundle:25:in `<main>'
Tasks: TOP => gitlab:db:validate_config
(See full trace by running task with --trace)
Proposal
Allow main_clusterwide
with database_tasks: false
when used in a different Cell
/cc @ayufan
Workaround
Set:
export GITLAB_VALIDATE_DATABASE_CONFIG=0
Edited by Thong Kuah