Skip to content
Snippets Groups Projects
Commit 2331966d authored by Balasankar "Balu" C's avatar Balasankar "Balu" C Committed by Robert Marshall
Browse files

Support user wanting us to do their job

parent 9736bb40
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -609,7 +609,7 @@ default['gitlab']['gitlab-workhorse']['enable'] = false
default['gitlab']['gitlab-workhorse']['ha'] = false
default['gitlab']['gitlab-workhorse']['listen_network'] = "unix"
default['gitlab']['gitlab-workhorse']['listen_umask'] = 000
default['gitlab']['gitlab-workhorse']['sockets_directory'] = "/var/opt/gitlab/gitlab-workhorse/sockets"
default['gitlab']['gitlab-workhorse']['sockets_directory'] = nil
default['gitlab']['gitlab-workhorse']['listen_addr'] = nil
default['gitlab']['gitlab-workhorse']['auth_backend'] = "http://localhost:8080"
default['gitlab']['gitlab-workhorse']['auth_socket'] = nil
Loading
Loading
Loading
Loading
@@ -20,14 +20,15 @@ module GitlabWorkhorse
def parse_variables
Gitlab['gitlab_workhorse']['auth_socket'] = nil if !auth_socket_specified? && auth_backend_specified?
 
user_listen_addr = Gitlab['gitlab_workhorse']['listen_addr']
Gitlab['gitlab_workhorse']['sockets_directory'] ||= '/var/opt/gitlab/gitlab-workhorse/sockets' if !user_listen_addr.nil?
sockets_dir = Gitlab['gitlab_workhorse']['sockets_directory']
default_network = Gitlab['node']['gitlab']['gitlab-workhorse']['listen_network']
user_network = Gitlab['gitlab_workhorse']['listen_network']
network = user_network || default_network
 
default_sockets_dir = Gitlab['node']['gitlab']['gitlab-workhorse']['sockets_directory']
user_sockets_dir = Gitlab['gitlab_workhorse']['sockets_directory']
sockets_dir = user_sockets_dir || default_sockets_dir
Gitlab['gitlab_workhorse']['listen_addr'] ||= File.join(sockets_dir, 'socket') if network == "unix"
end
 
Loading
Loading
Loading
Loading
@@ -12,11 +12,4 @@ class GitlabWorkhorseHelper < BaseHelper
def unix_socket?
node['gitlab']['gitlab-workhorse']['listen_network'] == "unix"
end
def user_customized_socket?
default_path = node.default['gitlab']['gitlab-workhorse']['listen_addr']
configured_path = node['gitlab']['gitlab-workhorse']['listen_addr']
default_path != configured_path
end
end
Loading
Loading
@@ -31,13 +31,12 @@ directory working_dir do
recursive true
end
 
if workhorse_helper.unix_socket?
if workhorse_helper.unix_socket? && !gitlab_workhorse_socket_dir.nil?
directory gitlab_workhorse_socket_dir do
owner account_helper.gitlab_user
group account_helper.web_server_group
mode '0750'
recursive true
not_if { workhorse_helper.user_customized_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