Revert "Merge branch '6078-deprecate-unicorn' into 'master'"
What does this MR do?
This reverts !5180 (merged) after receiving the following error during the nightly upgrade on dev.gitlab.org (incident issue production#4409)
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
NoMethodError
-------------
undefined method `empty?' for false:FalseClass
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/deprecations.rb:222:in `deprecate_only_if_value'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/deprecations.rb:215:in `additional_deprecations'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/deprecations.rb:208:in `check_config'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/omnibus_helper.rb:204:in `check_deprecations'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:28:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/deprecations.rb:
215: messages += deprecate_only_if_value(incoming_version, existing_config, type, ['gitlab', 'unicorn'], 'enable', true, '13.10', '14.0')
216:
217: messages
218: end
219:
220: def deprecate_only_if_value(incoming_version, existing_config, type, config_keys, key, value, deprecated_version, removed_version)
221: setting = existing_config.dig(*config_keys) || {}
222>> return [] if setting[key].nil? || setting[key].empty?
223:
224: return [] if type == :removal && setting[key] != value
225:
226: config_keys.shift if ATTRIBUTE_BLOCKS.include?(config_keys[0])
227: messages = []
228:
229: if Gem::Version.new(incoming_version) >= Gem::Version.new(removed_version) && type == :removal
230: messages << "* #{config_keys[0]}[#{key}] has been deprecated since #{deprecated_version} and was removed in #{removed_version}."
231: elsif Gem::Version.new(incoming_version) >= Gem::Version.new(deprecated_version) && type == :deprecation
System Info:
------------
chef_version=15.14.0
platform=ubuntu
platform_version=16.04
ruby=ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [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:
undefined method `empty?' for false:FalseClass
Running handlers complete
Chef Infra Client failed. 0 resources updated in 03 seconds
===
There was an error running gitlab-ctl reconfigure. Please check the output above for more
details.
===
dpkg: error processing package gitlab-ce (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
gitlab-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
Related issues
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
-
Merge Request Title, and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com -
Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks -
trigger-package
has a green pipeline running against latest commit
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added -
Integration tests added to GitLab QA -
Equivalent MR/issue for the GitLab Chart opened
Edited by Craig Barrett