Merge branch '2796-ensure-consul-runs-before-pgbouncer'
This commit is contained in:
commit
b50d504782
|
@ -15,6 +15,14 @@ omnibus-gitlab repository.
|
|||
- Added PostgreSQL support for track_io_timing
|
||||
- Rename Rails secret jws_private_key to openid_connect_signing_key
|
||||
|
||||
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
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#
|
||||
|
||||
account_helper = AccountHelper.new(node)
|
||||
omnibus_helper = OmnibusHelper.new(node)
|
||||
pgb_helper = PgbouncerHelper.new(node)
|
||||
|
||||
include_recipe 'gitlab::postgresql_user'
|
||||
|
@ -47,6 +48,7 @@ template "#{node['gitlab']['pgbouncer']['data_directory']}/pgbouncer.ini" do
|
|||
source "#{File.basename(name)}.erb"
|
||||
variables lazy { node['gitlab']['pgbouncer'].to_hash }
|
||||
notifies :run, 'execute[reload pgbouncer]', :immediately
|
||||
notifies :run, 'execute[start pgbouncer]', :immediately
|
||||
end
|
||||
|
||||
file 'databases.json' do
|
||||
|
@ -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
|
||||
|
@ -70,9 +73,17 @@ execute 'generate databases.ini' do
|
|||
EOF
|
||||
}
|
||||
action :nothing
|
||||
only_if { omnibus_helper.service_up?('pgbouncer') }
|
||||
end
|
||||
|
||||
execute 'reload pgbouncer' do
|
||||
command '/opt/gitlab/embedded/bin/sv hup pgbouncer'
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue