Skip to content
Snippets Groups Projects
Commit 8079384d authored by Balasankar C's avatar Balasankar C
Browse files

Merge branch...

Merge branch '5570-puma-socket-configuration-option-needs-to-also-reconfigure-workhorse' into 'master'

Update workhorse auth socket when puma uses custom socket

Closes #5570

See merge request gitlab-org/omnibus-gitlab!4620
parents 8bc9749e 57ccffe6
No related branches found
No related tags found
No related merge requests found
---
title: Update workhorse auth socket when puma uses custom socket
merge_request: 4620
author:
type: fixed
Loading
Loading
@@ -19,6 +19,7 @@ module Puma
class << self
def parse_variables
only_one_allowed!
parse_listen_address
end
 
def only_one_allowed!
Loading
Loading
@@ -27,6 +28,11 @@ module Puma
raise 'Only one web server (Puma or Unicorn) can be enabled at the same time!'
end
 
def parse_listen_address
puma_socket = Gitlab['puma']['socket'] || Gitlab['node']['gitlab']['puma']['socket']
Gitlab['gitlab_workhorse']['auth_socket'] = puma_socket if Gitlab['gitlab_workhorse']['auth_backend'].nil?
end
def workers(total_memory = Gitlab['node']['memory']['total'].to_i)
[
2, # Two is the minimum or web editor will no longer work.
Loading
Loading
Loading
Loading
@@ -119,6 +119,10 @@ RSpec.describe 'gitlab::puma with Ubuntu 16.04' do
max_threads: 10,
per_worker_max_memory_mb: 1000
)
expect(chef_run).to render_file("/opt/gitlab/sv/gitlab-workhorse/run").with_content { |content|
expect(content).to match(%r(-authSocket /tmp/puma.socket))
}
expect(Gitlab['gitlab_workhorse']['auth_socket']).to eq('/tmp/puma.socket')
end
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment