Skip to content
Snippets Groups Projects
Commit 2d84e7a5 authored by Balasankar 'Balu' C's avatar Balasankar 'Balu' C
Browse files

Merge branch 'properly-reload-patroni-on-config-change' into 'master'

Properly reload Patroni on config change

Closes #6420

See merge request gitlab-org/omnibus-gitlab!5644
parents cee44418 5a5cd7aa
No related branches found
No related tags found
2 merge requests!55Intermediate build after shift of stable series,!54GitLab 14.4
......@@ -58,7 +58,7 @@
postgresql_defaults: node['postgresql'].to_hash
)
)
notifies :reload, 'runit_service[patroni]', :delayed if omnibus_helper.should_notify?(patroni_helper.service_name)
notifies :hup, 'runit_service[patroni]', :delayed if omnibus_helper.should_notify?(patroni_helper.service_name)
end
runit_service 'patroni' do
......
......@@ -219,6 +219,13 @@
expect(chef_run).to disable_runit_service('postgresql')
end
it 'should notify patroni service to hup' do
allow_any_instance_of(OmnibusHelper).to receive(:should_notify?).and_call_original
allow_any_instance_of(OmnibusHelper).to receive(:should_notify?).with('patroni').and_return(true)
expect(chef_run.template('/var/opt/gitlab/patroni/patroni.yaml')).to notify('runit_service[patroni]').to(:hup)
end
it 'should skip standalone postgresql configuration' do
expect(chef_run).to create_postgresql_config('gitlab')
expect(chef_run.postgresql_config('gitlab')).not_to notify('execute[start postgresql]').to(:run)
......
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