Ensure Ruby platform is set globally for arm64 based operating systems
What does this MR do?
Previously Gitaly's bundle install
installed a native gem for
Nokogiri, even though GitLab Rails already installed the Ruby platform
version. bundle config set <value>
by default only sets the value
locally, so the force_ruby_platform
setting only affected GitLab
Rails.
Due to rack-compiler-dock
building native gems on arm64 with a
Ubuntu 20.04-based image instead of manylinux
(https://github.com/pypa/manylinux) as x86 builds do, arm64 native
gems depend on glibc v2.29. RedHat arm64 platforms usually use an
older version, such as v2.28 in CentOS 8.
Note that Omnibus depends on a number of projects that may use native gems:
- GitLab Rails
- Gitaly
- gitlab-exporter
- MailRoom
Currently only Nokogiri v1.13 appears to ship an arm64 native
gem. However, if some gem does the same, such as pg
, then we'd hit
similar issues with gitlab-exporter
. To avoid this, set
force_ruby_platform
to true
globally.
Related issues
Relates to gitlab#367444 (closed)
Testing
- Provisioned Amazon Linux 2 machine with
aarch64
. (Theyum install
command didn't work in https://packages.gitlab.com/gitlab/gitlab-ce/packages/amazon/2/gitlab-ce-15.1.2-ce.0.amazon2.aarch64.rpm for me, though. Manually installed withwget
). - Installed GitLab 15.1.2-ce.
- Validated errors in Wiki.
- Installed package https://dev.gitlab.org/gitlab/omnibus-gitlab/-/jobs/13163248. Validated Wiki page and
gitaly-ruby
started up.
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: https://dev.gitlab.org/gitlab/omnibus-gitlab/-/merge_requests/223 -
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