LDAP appears to be broken - upgrade from 10.2.4 CE to 10.2.5 CE

I have just upgraded from 10.2.4CE to 10.2.5CE via ubuntu apt repo at https://packages.gitlab.com/gitlab/gitlab-ce.

system: ubuntu 16.04 running as hyper-v VM, 8GB ram, 4x2.2GHz procs, latest patches and kernel applied

On upgrade and any subsequent gitlab-ctl reconfigure, it fails with the following error:

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

  • gitlab (0.0.1)
  • package (0.1.0)
  • registry (0.1.0)
  • mattermost (0.1.0)
  • consul (0.0.0)
  • gitaly (0.1.0)
  • runit (0.14.2)
    Installing Cookbook Gems:
    Compiling Cookbooks…

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


(): did not find expected key while parsing a block mapping at line 2 column 5

Cookbook Trace:

/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:100:in block in from_file' /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/config_mash.rb:28:in auto_vivify’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:100:in from_file' /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:23:in from_file’
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file’

Relevant File Content:


93: def ee_attribute(name, **config)
94: config = { ee: true }.merge(config)
95: attribute(name, **config)
96: end
98: def from_file(_file_path)
99: # Allow auto mash creation during from_file call
100>> Gitlab::ConfigMash.auto_vivify { super }
101: end
103: def method_missing(method_name, *arguments) # rubocop:disable Style/MethodMissing
104: # Give better message for NilClass errors
105: # If there are no arguements passed, this is a ‘GET’ call, and if
106: # there is no matching key in the configuration, then it has not been set (not even to nil)
107: # and we will output a nicer error above the exception
108: if arguments.length.zero? && !configuration.key?(method_name)
109: breaktxt = ‘=’ * 80



I have tracked the issue to LDAP and to a specific line:
gitlab_rails[‘ldap_enabled’] = true
gitlab_rails[‘ldap_servers’] = YAML.load <<-EOS
main: # ‘main’ is the GitLab ‘provider ID’ of this LDAP server
label: ‘LDAP’ —<issue here


It does not matter what the rest of the config inside EOS block contains, as soon as your specify the lable, it fails with the above error.

I have also tried a completely clean VM with the latest patches and a clean install, applying only the first few lines of an LDAP config and no other config - it fails, so this issue appears to be repeatable.

Any help would be greatly appreciated.


I have it sorted out, though I am no wiser as to what happened.

Basically I went back to basics and started again. For some reason, this time it worked and the upgrade was successful. I am using exactly the same config as before. It also seems to have resolved a number of performance issues at the same time (though I did not that there were performance improvements in this update).