Geo SSH proxy uses the primary external instead of internal URL
Pushing through SSH on a Geo secondary, when the request needs to be proxied to the primary, will use the external URL of the primary instead of the internal URL.
For example, in my tests, I was using unified-url.gitlab-geo.test
which does not exist, as the external URL (and locally on my computer in /etc/hosts
), but pushing to the secondary shows:
remote:
remote: This request to a Geo secondary node will be forwarded to the
remote: Geo primary node:
remote:
remote: ssh://git@unified-url.gitlab-geo.test:2222/root/proj22.git
remote:
remote:
remote: ========================================================================
remote:
remote: Failed to contact primary http://unified-url.gitlab-geo.test/root/proj22.git
Error: Failed to open TCP connection to unified-url.gitlab-geo.test:80 (getaddrinfo: Name or service not known)
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
This could be a problem with unified URLs, as the secondary might unintentionally not hit the primary if using the same URL instead of the internal URL.
In EE::Gitlab::GeoGitAccess
we use geo_primary_http_url_to_repo
which is the external URL, we should likely change this here to be the internal one instead.