Skip to content
Snippets Groups Projects
Commit bbeef5be authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Merge branch '2796-run-consul-before-pgbouncer' into 'master'

Update pgbouncer notification to not stop on failure

Closes #2796

See merge request gitlab-org/omnibus-gitlab!2020

(cherry picked from commit 11069a58)

0af854cc Update pgbouncer notification to not stop on failure
parent 7eeb7fe6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -39,6 +39,14 @@ omnibus-gitlab repository.
 
- No changes
 
10.0.4
- Ensure pgbouncer doesn't fail reconfigure if database isn't ready yet
10.0.3
- No changes
10.0.2
 
- Fix an issue where enabling a GitLab Geo role would also disable all default services 11e6dbf
Loading
Loading
Loading
Loading
@@ -15,6 +15,7 @@
#
 
account_helper = AccountHelper.new(node)
omnibus_helper = OmnibusHelper.new(node)
pgb_helper = PgbouncerHelper.new(node)
 
include_recipe 'gitlab::postgresql_user'
Loading
Loading
@@ -46,7 +47,8 @@ end
template "#{node['gitlab']['pgbouncer']['data_directory']}/pgbouncer.ini" do
source "#{File.basename(name)}.erb"
variables lazy { node['gitlab']['pgbouncer'].to_hash }
notifies :run, 'execute[generate databases.ini]', :immediately
notifies :run, 'execute[reload pgbouncer]', :immediately
notifies :run, 'execute[start pgbouncer]', :immediately
end
 
file 'databases.json' do
Loading
Loading
@@ -55,6 +57,7 @@ file 'databases.json' do
group lazy { node['gitlab']['pgbouncer']['databases_ini_user'] }
content node['gitlab']['pgbouncer']['databases'].to_json
notifies :run, 'execute[generate databases.ini]', :immediately
notifies :run, 'execute[start pgbouncer]', :immediately
end
 
execute 'generate databases.ini' do
Loading
Loading
@@ -66,7 +69,21 @@ execute 'generate databases.ini' do
--hostuser #{node['gitlab']['pgbouncer']['databases_ini_user']} \
--pg-host #{node['gitlab']['pgbouncer']['listen_addr']} \
--pg-port #{node['gitlab']['pgbouncer']['listen_port']}
--user #{node['gitlab']['pgbouncer']['databases_ini_user']}
EOF
}
action :nothing
only_if { omnibus_helper.service_up?('pgbouncer') }
end
execute 'reload pgbouncer' do
command '/opt/gitlab/bin/gitlab-ctl hup pgbouncer'
action :nothing
only_if { omnibus_helper.service_up?('pgbouncer') }
end
execute 'start pgbouncer' do
command '/opt//gitlab/bin/gitlab-ctl start pgbouncer'
action :nothing
not_if { omnibus_helper.service_up?('pgbouncer') }
end
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