diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 06:08:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 06:08:49 +0300 |
commit | a8c82a6395ed62380b9061a26d92e41d46c2877e (patch) | |
tree | bd8ab49ac11104ad9ae953afd4c5e0036fdddaa2 /lib/gitlab/config_checker | |
parent | 0b881f91159cc97ccb7328a2e52977a60ea83fbe (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/config_checker')
-rw-r--r-- | lib/gitlab/config_checker/puma_rugged_checker.rb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/gitlab/config_checker/puma_rugged_checker.rb b/lib/gitlab/config_checker/puma_rugged_checker.rb new file mode 100644 index 00000000000..a9bbaebaf0b --- /dev/null +++ b/lib/gitlab/config_checker/puma_rugged_checker.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +module Gitlab + module ConfigChecker + module PumaRuggedChecker + extend self + extend Gitlab::Git::RuggedImpl::UseRugged + + def check + return [] unless Gitlab::Runtime.puma? + + notices = [] + + link_start = '<a href="https://docs.gitlab.com/ee/administration/operations/puma.html">' + link_end = '</a>' + notices << { + type: 'info', + message: _('You are running Puma, which is currently experimental. '\ + 'More information is available in our '\ + '%{link_start}documentation%{link_end}.') % { link_start: link_start, link_end: link_end } + } + + if running_puma_with_multiple_threads? + link_start = '<a href="https://docs.gitlab.com/ee/administration/operations/puma.html">' + link_end = '</a>' + notices << { + type: 'info', + message: _('Puma is running with a thread count above 1. '\ + 'Information on deprecated GitLab features in this configuration is available in the '\ + '%{link_start}documentation%{link_end}.') % { link_start: link_start, link_end: link_end } + } + end + + if running_puma_with_multiple_threads? && rugged_enabled_through_feature_flag? + link_start = '<a href="https://docs.gitlab.com/ee/administration/operations/puma.html#performance-caveat-when-using-puma-with-rugged">' + link_end = '</a>' + notices << { + type: 'warning', + message: _('Puma is running with a thread count above 1 and the rugged '\ + 'service is enabled. This may decrease performance in some environments. '\ + 'See our %{link_start}documentation%{link_end} '\ + 'for details of this issue.') % { link_start: link_start, link_end: link_end } + } + end + + notices + end + end + end +end |