Geo: Relative URL roots in external_url causes redirect loop on secondary login
Summary
Having a relative URL root in the external_url of a primary causes a 302 redirect loop on the secondary when logging in.
Steps to reproduce
- Set the
external_urlwith a relative root - Add secondary
- Try to login to secondary
- Gets redirected to primary for login
- Enter credentials
- Redirect back to secondary gets stuck in 302 redirect loop
What is the current bug behavior?
external_url with relative URL root (i.e. gitlab.example.com/gitlab) causes a 302 redirect loop when logging into a secondary
What is the expected correct behavior?
You should be redirected back to the secondary after entering credentials.
Relevant logs and/or screenshots
In the secondary NGINX logs we see:
multiple 302 for GET /gitlab/oauth/geo/callback?
until we see 499
In the primary NGINX logs we see:
==> /var/log/gitlab/nginx/gitlab_error.log <==
2018/03/26 11:00:15 [error] 20783#0: *135 open() "/var/opt/gitlab/nginx/html/api/v4/user" failed (2: No such file or directory), client: 1.1.1.1, server: gitlab.example.com, request: "GET /api/v4/user HTTP/1.1", host: "gitlab.example.com"
==> /var/log/gitlab/nginx/gitlab_access.log <==
172.22.203.18 - - [26/Mar/2018:11:00:15 -0400] "GET /api/v4/user HTTP/1.1" 404 1565 "" "Faraday v0.12.2"
See customer ticket for logs from primary and secondary servers.
Links
Customer ticket -> https://gitlab.zendesk.com/agent/tickets/93087 (internal)
GitLab 10.5.5-ee
customer ~Geo
Edited by Aric Buerer