Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #7969

Closed
Open
Created Oct 06, 2014 by Administrator@rootOwner

external_url requires = symbol

Created by: spuder

The file /etc/gitlab/gitlab.rb takes parameters. All of them are separated like so

foo = bar

The one exception is the external_url parameter which omits the = symbol.

As pointed out in this issue, (https://github.com/spuder/puppet-gitlab/issues/84 ) if you mistakenly include the = symbol, then /var/opt/gitlab/gitlab-rails/etc/gitlab.yml will be set to the hostname (not the intended value).

Steps to reproduce

Set the value properly (with no =), the gitlab.yml will be set as expected

$ cat /etc/gitlab/gitlab.rb | grep external_url
external_url 'http://foo.example.com'
$ gitlab-ctl reconfigure 
$ cat /var/opt/gitlab/gitlab-rails/etc/gitlab.yml | grep foo.example.com
# gitlab.yml will show the host: of foo.example.com (expected)

On a fresh install, set the gitlab.rb file without a =, the gitlab.yml will be set to the hostname

$ cat /etc/gitlab/gitlab.rb | grep external_url
external_url = 'http://foo.example.com'
$ gitlab-ctl reconfigure 
$ cat /var/opt/gitlab/gitlab-rails/etc/gitlab.yml | grep foo.example.com
# gitlab.yml will show the host: equal to the fqdn, and not the value of external_url (unexpected)

This bug is subtile, and difficult to catch because almost everything works properly. Users should expect gitlab to either:

  • Throw a warning if the = is mistakenly provided in the gitlab.rb file
  • Handle both syntaxes identically.
Assignee
Assign to
Time tracking