Skip to content
Snippets Groups Projects
Commit 9b7fe107 authored by Robert Marshall's avatar Robert Marshall
Browse files

Merge branch 'move-geo-logcursor-to-underscored-form' into 'master'

parents e6fee0bf a1212d12
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -158,9 +158,10 @@ default['gitlab']['geo-postgresql']['auto_restart_on_version_change'] = true
# Geo: LogCursor (replication)
###
 
default['gitlab']['geo-logcursor']['ha'] = false
default['gitlab']['geo-logcursor']['log_directory'] = '/var/log/gitlab/geo-logcursor'
default['gitlab']['geo-logcursor']['env_directory'] = '/opt/gitlab/etc/geo-logcursor/env'
default['gitlab']['geo_logcursor']['ha'] = false
default['gitlab']['geo_logcursor']['log_directory'] = '/var/log/gitlab/geo-logcursor'
default['gitlab']['geo_logcursor']['env_directory'] = '/opt/gitlab/etc/geo-logcursor/env'
 
default['gitlab']['suggested-reviewers'] = Gitlab::Deprecations::NodeAttribute.new(proc { node['gitlab']['suggested_reviewers'].to_h }, "node['gitlab']['suggested-reviewers']", "node['gitlab']['suggested_reviewers']")
default['gitlab']['geo-secondary'] = Gitlab::Deprecations::NodeAttribute.new(proc { node['gitlab']['geo_secondary'].to_h }, "node['gitlab']['geo-secondary']", "node['gitlab']['geo_secondary']")
default['gitlab']['geo-logcursor'] = Gitlab::Deprecations::NodeAttribute.new(proc { node['gitlab']['geo_logcursor'].to_h }, "node['gitlab']['geo-logcursor']", "node['gitlab']['geo_logcursor']")
Loading
Loading
@@ -24,7 +24,8 @@ include_recipe 'gitlab::default'
geo-postgresql
geo-logcursor
].each do |service|
if node['gitlab'][service]['enable']
node_attribute_key = SettingsDSL::Utils.sanitized_key(service)
if node['gitlab'][node_attribute_key]['enable']
include_recipe "gitlab-ee::#{service}"
else
include_recipe "gitlab-ee::#{service}_disable"
Loading
Loading
Loading
Loading
@@ -18,8 +18,8 @@ account_helper = AccountHelper.new(node)
omnibus_helper = OmnibusHelper.new(node)
 
working_dir = "#{node['package']['install-dir']}/embedded/service/gitlab-rails"
log_directory = node['gitlab']['geo-logcursor']['log_directory']
env_directory = node['gitlab']['geo-logcursor']['env_directory']
log_directory = node['gitlab']['geo_logcursor']['log_directory']
env_directory = node['gitlab']['geo_logcursor']['env_directory']
 
rails_env = {
'HOME' => node['gitlab']['user']['home'],
Loading
Loading
@@ -41,7 +41,7 @@ directory log_directory do
end
 
runit_service 'geo-logcursor' do
start_down node['gitlab']['geo-logcursor']['ha']
start_down node['gitlab']['geo_logcursor']['ha']
options({
user: account_helper.gitlab_user,
groupname: account_helper.gitlab_group,
Loading
Loading
@@ -49,7 +49,7 @@ runit_service 'geo-logcursor' do
env_dir: env_directory,
log_directory: log_directory
}.merge(params))
log_options node['gitlab']['logging'].to_hash.merge(node['gitlab']['geo-logcursor'].to_hash)
log_options node['gitlab']['logging'].to_hash.merge(node['gitlab']['geo_logcursor'].to_hash)
end
 
dependent_services = node['gitlab']['gitlab-rails']['dependent_services']
Loading
Loading
Loading
Loading
@@ -43,6 +43,7 @@ module SettingsDSL
gitlab_kas_nginx
gitlab_kas
geo_secondary
geo_logcursor
].freeze
 
def self.extended(base)
Loading
Loading
Loading
Loading
@@ -33,7 +33,7 @@ RSpec.describe 'gitlab-ee::geo' do
 
context 'in geo_logcursor settings' do
it 'is not enabled' do
expect(node['gitlab']['geo-logcursor']['enable']).to eq(nil)
expect(node['gitlab']['geo_logcursor']['enable']).to eq(nil)
end
end
 
Loading
Loading
@@ -88,7 +88,7 @@ RSpec.describe 'gitlab-ee::geo' do
 
context 'in geo_logcursor settings' do
it 'is enabled' do
expect(node['gitlab']['geo-logcursor']['enable']).to eq(true)
expect(node['gitlab']['geo_logcursor']['enable']).to eq(true)
end
end
 
Loading
Loading
Loading
Loading
@@ -39,6 +39,7 @@ RSpec.describe SettingsDSL::Utils do
%w[gitlab-workhorse gitlab_workhorse],
%w[gitlab-kas gitlab_kas],
%w[geo-secondary geo_secondary],
%w[geo-logcursor geo_logcursor],
].each do |input, output|
expect(subject.sanitized_key(input)).to eq(output)
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