PostgreSQL FDW port cannot handle strings
If you include the entry:
gitlab_rails['db_port'] = "6432"
reconfigure on the secondary dies due to the fact it is a string, not an integer in https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab-ee/resources/postgresql_fdw.rb#L6:
root@postgres-02.db.geo2.gitlab.com# sudo gitlab-ctl reconfigure
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab-ee"]
Synchronizing Cookbooks:
- package (0.1.0)
- gitlab-ee (0.0.1)
- gitlab (0.0.1)
- consul (0.0.0)
- repmgr (0.1.0)
- runit (0.14.2)
- postgresql (0.1.0)
- registry (0.1.0)
- mattermost (0.1.0)
- gitaly (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: gitlab::default
* directory[/etc/gitlab] action create (up to date)
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/default.rb
================================================================================
Chef::Exceptions::ValidationFailed
----------------------------------
Property external_port must be one of: Integer! You passed "6432".
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/geo-postgresql.rb:180:in `block in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/geo-postgresql.rb:177:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/default.rb:30:in `block in from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/default.rb:28:in `each'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/default.rb:28:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab-ee/recipes/geo-postgresql.rb:
173:
174: not_if { geo_pg_helper.is_offline_or_readonly? || geo_pg_helper.schema_exists?('gitlab_secondary', geo_database_name) }
175: end
176:
177: postgresql_fdw 'gitlab_secondary' do
178: db_name geo_database_name
179: external_host fdw_host
180>> external_port fdw_port
181: external_name fdw_dbname
182: helper geo_pg_helper
183: action :create
184: end
185:
186: postgresql_fdw_user_mapping 'gitlab_secondary' do
187: db_user geo_pg_user
188: db_name geo_database_name
189: external_user fdw_user
Platform:
---------
x86_64-linux
Running handlers:
There was an error running gitlab-ctl reconfigure:
Property external_port must be one of: Integer! You passed "6432".
/cc: @brodock