gitlab-ctl show-config broken
I'm running GitLab EE 9.5.3 and am getting am getting the following error:
root@192:/# gitlab-ctl show-config
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/show_config.rb
================================================================================
NoMethodError
-------------
undefined method `each' for nil:NilClass
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/services_helper.rb:160:in `set_services_status'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/services_helper.rb:79:in `enable'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/services_helper.rb:87:in `set_enable'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/prometheus.rb:44:in `parse_exporter_enabled'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/prometheus.rb:31:in `parse_variables'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:271:in `generate_config'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/show_config.rb:23:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/services_helper.rb:
153: else
154: Gitlab[:node].write(:default, *service_path, 'enable', value)
155: end
156: end
157:
158: def set_services_status(enable, *services, except: nil)
159: exceptions = [except].flatten
160>> service_list.each do |name, _|
161: # Set the service enable config if:
162: # The current service is not in the list of exceptions
163: # AND
164: # The current service was requested to be set, or ALL_SERVICES was
165: # requested, so we are setting them all
166: if !exceptions.include?(name) && (services.include?(ALL_SERVICES) || services.include?(name))
167: service_status(name, enable)
168: end
169: end
Platform:
---------
x86_64-linux
Use --help for help about querying packages.
root@192:/# dpkg-query -W gitlab
gitlab
My installation is in a Docker container and has been upgraded frequently using apt-get update && apt-get install gitlab-ee
.
I've tried running this command in a non-Docker installation (with 9.5.4-ee) with the same result. It does, however, work with a new installation of 9.4.2-ee.
Edited by Harish Ramachandran