reconfigure incorrectly sets listen for nginx and registry
Summary
When configuring via gitlab.rb, listen addresses are incorrect the nginx config files.
Steps to reproduce
-
setting NGINX to listen to HTTP on a specific IP or DNS: a. in gitlab.rb, configure: external_url 'http://giltab.dns.com:81' run "gitlab-ctl reconfigure" in gitlab-http.conf, you get: listen *:81; b. in gitlab.rb, configure: external_url 'http://giltab.dns.com:81' nginx['listen_addresses'] = [ 'giltab.dns.com' ] run "gitlab-ctl reconfigure" in gitlab-http.conf, you get: listen giltab.dns.com:81 c. this seems to work as expected.
-
setting NGINX Repository to listen on a specific IP or DNS: a. in gitlab.rb, configure: registry_external_url 'http://giltab.dns.com:4567' run "gitlab-ctl reconfigure" in gitlab-registry.conf, you get: listen *:4567; b. in gitlab.rb, configure: registry_external_url 'http://giltab.dns.com:4567' gitlab_rails['registry_enabled'] = true gitlab_rails['registry_host'] = "giltab.dns.com" gitlab_rails['registry_port'] = "4567" run "gitlab-ctl reconfigure" in gitlab-registry.conf, you get: listen *:4567; c. Expected result is the listen port in the gitlab-registry.conf file is: listen giltab.dns.com:4567
Example Project
None
What is the current bug behavior?
When configuring a gitlab and registry the nginx listen is incorrect. a. for HTTP server (nginx web server) the url portion of in external_url create "listen *:port" in file gitlab-http.conf b. for HTTP registry (nginx web server) the url portion of in registry_external_url defines "listen *:port" in file gitlab-registry.conf
What is the expected correct behavior?
When configuring a gitlab and registry the nginx listen should reflect the values provided in gitlab.rb: a. for HTTP server (nginx web server); external_url 'http://gitlab.dns.com:123' should configure the listen value (in gitlab-http.conf) as: listen gitlab.dns.com:123
b. for HTTP registry (nginx web server); registry_external_url 'http://gitlab.dns.com:4567' should configure a listen value (in gitlab-http.conf) as: listen gitlab.dns.com:4567
Relevant logs and/or screenshots
None
Output of checks
None
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)