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

Merge branch '6619-update-postgres-runtime-conf-during-pg13-ha-upgrades' into 'master'

Update PG runtime conf before restarting

Closes #6619

See merge request gitlab-org/omnibus-gitlab!5848
parents 58ab08f5 d8872d33
No related branches found
No related tags found
2 merge requests!65heptapod#658: intermediate release to test the shift,!64GitLab 14.8
......@@ -90,17 +90,6 @@
notifies :run, 'ruby_block[wait for node bootstrap to complete]', :before
end
ruby_block 'wait for postgresql to start' do
block { pg_helper.is_ready? }
only_if { omnibus_helper.should_notify?(patroni_helper.service_name) }
end
execute 'reload postgresql' do
command "#{patroni_helper.ctl_command} -c #{patroni_config_file} reload --force #{node['patroni']['scope']} #{node['patroni']['name']}"
only_if { patroni_helper.node_status == 'running' }
action :nothing
end
Dir["#{patroni_data_dir}/*"].each do |src|
file File.join(node['postgresql']['dir'], 'data', File.basename(src)) do
owner account_helper.postgresql_user
......@@ -113,6 +102,17 @@
end
end
ruby_block 'wait for postgresql to start' do
block { pg_helper.is_ready? }
only_if { omnibus_helper.should_notify?(patroni_helper.service_name) }
end
execute 'reload postgresql' do
command "#{patroni_helper.ctl_command} -c #{patroni_config_file} reload --force #{node['patroni']['scope']} #{node['patroni']['name']}"
only_if { patroni_helper.node_status == 'running' }
action :nothing
end
database_objects 'patroni' do
pg_helper pg_helper
account_helper account_helper
......
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