Geo secondary name as specified in the UI needs to match external_url with a slash appended
Summary
When adding a Geo Secondary the name specified has to match the external_url defined.
In release 11.11.5 the external_url also needs to have a / appended to the external_url in gitlab.rb, in release 12 this is not necessary.
Steps to reproduce
Configure an Omnibus install of two GitLab instances using Geo. When adding the secondary us a hostname, or location in the name setting.
What is the current bug behavior?
After adding the secondary Geo node
irb(main):001:0> GeoNode.current_node
=> nil
irb(main):003:0> GeoNode.all
=> #<ActiveRecord::Relation [#<GeoNode id: 1, primary: ...
#<GeoNode id: 2, primary: ... url: "http://geo2.vagrant/",...name: "geo2.vagrant",
This shows the mismatch between url <=> name.
What is the expected correct behavior?
Geo secondary to be added successfully along with the ability to name the Geo node as you want.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Tested on releases
- 11.11.5
- 12.2.5
Possible fixes
A workaround is set the name from the primary host via the Rails console
GeoNode.find(2).update!(name: "your-external-url-plus-a-slash") ### e.g. http://geo2.vagrant/
