Update Cinc/Ohai to 18.x series (try 2)
What does this MR do?
This restores the upgrade to Cinc/Ohai to v18.x first introduced in !6997 (merged) but reverted in !7360 (merged) due to gitlab-com/gl-infra/production#17417 (closed).
Update Cinc/Ohai to 18.x series
- Add unf_ext gem because it is a direct dependency for Cinc versions greater than 18.0.169
- Updates Cinc gem from 17.10.95 to 18.3.0
- Updates Ohai gem from 17.9.0 to 18.1.3
- Updates software config for chef-bin, chef-gem, and ohai
- Remove ohai gem version workaround
This also adds ruby-shadow to the build:
-
In Chef 18.x, https://github.com/chef/chef/pull/11659 modified the Chef user provider to require the
ruby-shadow
gem anytime the NGINX user exists. This was introduced in order to update/etc/shadow
with an expiration date, if present. -
Previously it was not required because we don't set a password for the user: https://github.com/chef/chef/blob/v17.10.15/lib/chef/provider/user.rb#L69
-
The Chef Omnibus package ships with
ruby-shadow
, as it is listed in theGemfile
: https://github.com/chef/chef/blob/3c35bd0e1d17a5bfd779fab3cc7860ea1923dec6/Gemfile#L43 -
This gem isn't listed in the
.gemspec
, so Ruby doesn't include it as an explicit requirement. However, Omnibus GitLab now needs this.
Related issues
Closes #8294 (closed)
How to validate locally
- Attempt to install/upgrade an existing Omnibus installation and run
gitlab-ctl reconfigure
multiple times. - If you test with a Docker image, be sure that
manage_accounts['enable'] = true
is set. This is set tofalse
inside Docker. - Ensure
require 'shadow'
works:
$ /opt/gitlab/embedded/bin/irb
irb(main):001:0> require 'shadow'
=> true
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
MR title and description are up to date, accurate, and descriptive. -
MR targeting the appropriate branch. -
Latest Merge Result pipeline is green. -
When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow.
For GitLab team members
If you don't have access to this, the reviewer should trigger these jobs for you during the review process.
-
The manual Trigger:ee-package
jobs have a green pipeline running against latest commit. -
If config/software
orconfig/patches
directories are changed, make sure thebuild-package-on-all-os
job within theTrigger:ee-package
downstream pipeline succeeded. -
If you are changing anything SSL related, then the Trigger:package:fips
manual job within theTrigger:ee-package
downstream pipeline must succeed. -
If CI configuration is changed, the branch must be pushed to dev.gitlab.org
to confirm regular branch builds aren't broken.
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. -
Validate potential values for new configuration settings. Formats such as integer 10
, duration10s
, URIscheme://user:passwd@host:port
may require quotation or other special handling when rendered in a template and written to a configuration file.