GitLab broken after update

Hi there,

I’ve been using gitlab-ce for a while and had no issues: that’s a great software. I am using the debian package, updating it via the package manager.

Some update broke it, so now i can no longer access the web interface: " 500
Whoops, something went wrong on our end."

When i try to reconfigure, i get “no implicit conversion of nil into String”

gitlab-ctl reconfigure

Starting Chef Client, version 13.6.4
resolving cookbooks for run list: [“gitlab”]
Synchronizing Cookbooks:

  • gitlab (0.0.1)
  • package (0.1.0)
  • postgresql (0.1.0)
  • registry (0.1.0)
  • mattermost (0.1.0)
  • consul (0.0.0)
  • gitaly (0.1.0)
  • letsencrypt (0.1.0)
  • nginx (0.1.0)
  • runit (0.14.2)
  • acme (3.1.0)
  • crond (0.1.0)
  • compat_resource (12.19.0)
    Installing Cookbook Gems:
    Compiling Cookbooks…

================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb

TypeError

no implicit conversion of nil into String

Cookbook Trace:

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:49:in join' /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:49:in block in parse_git_data_dirs’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:46:in each' /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:46:in map’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:46:in parse_git_data_dirs' /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:26:in parse_variables’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:174:in block in generate_config' /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:172:in each’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:172:in generate_config' /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:26:in from_file’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file’

Relevant File Content:

/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:

42: def parse_git_data_dirs
43: Gitlab[‘git_data_dirs’] = { “default” => { “path” => “/var/opt/gitlab/git-data” } } if Gitlab[‘git_data_dirs’].empty?
44:
45: Gitlab[‘gitlab_rails’][‘repositories_storages’] =
46: Hash[Mash.new(Gitlab[‘git_data_dirs’]).map do |name, data_directory|
47: shard_gitaly_address = data_directory[‘gitaly_address’] || gitaly_address
48:
49>> defaults = { ‘path’ => File.join(data_directory[‘path’], ‘repositories’), ‘gitaly_address’ => shard_gitaly_address }
50: params = data_directory.merge(defaults)
51:
52: [name, params]
53: end]
54: end
55:
56: def parse_gitaly_storages
57: return unless Gitlab[‘gitaly’][‘storage’].nil?
58:

System Info:

chef_version=13.6.4
platform=debian
platform_version=9.5
ruby=ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client

Running handlers:
There was an error running gitlab-ctl reconfigure:

no implicit conversion of nil into String

Running handlers complete
Chef Client failed. 0 resources updated in 03 seconds

Just in case someone ends up here looking for this issue:

in gitlab.rb config the “git_data_dirs” array structure has changed. The debian updater doesn’t update it. Trying to configure the new gitlab with the old config syntax causes this issues.

Thanks for that answer, it really helped me out. I want to take it a step further and just describe what the new structure is.

git_data_dirs({ "default" => { "path" => "/path/to/git/data/" } })

Whereas the old config looked like this:

git_data_dirs({ "default" => "/mnt/nas/git-data" })

Changing it was able to get my gitlab-ctl reconfigure working for me. Thanks!