diff --git a/config/software/gitlab-cookbooks.rb b/config/software/gitlab-cookbooks.rb index 889ed9c42ecb61696c0af9237d36e532f564addb_Y29uZmlnL3NvZnR3YXJlL2dpdGxhYi1jb29rYm9va3MucmI=..64e7dff219b3467e3d28e2095403bc291859ba90_Y29uZmlnL3NvZnR3YXJlL2dpdGxhYi1jb29rYm9va3MucmI= 100644 --- a/config/software/gitlab-cookbooks.rb +++ b/config/software/gitlab-cookbooks.rb @@ -33,7 +33,7 @@ command "mkdir -p #{install_dir}/embedded/cookbooks" sync './', "#{install_dir}/embedded/cookbooks/" - solo_recipes = %w(dna postgresql-bin postgresql-config) + solo_recipes = %w(dna postgresql-bin postgresql-config pg-upgrade-config) # If EE package, use a different master cookbook if EE diff --git a/config/templates/gitlab-cookbooks/pg-upgrade-config.json.erb b/config/templates/gitlab-cookbooks/pg-upgrade-config.json.erb new file mode 100644 index 0000000000000000000000000000000000000000..64e7dff219b3467e3d28e2095403bc291859ba90_Y29uZmlnL3RlbXBsYXRlcy9naXRsYWItY29va2Jvb2tzL3BnLXVwZ3JhZGUtY29uZmlnLmpzb24uZXJi --- /dev/null +++ b/config/templates/gitlab-cookbooks/pg-upgrade-config.json.erb @@ -0,0 +1,14 @@ +{ + "run_list": [ "recipe[<%= master_cookbook %>]" ], + "package": { + "public_attributes": true + }, + "postgresql": { + "auto_restart_on_version_change": false + }, + "gitlab": { + "geo-postgresql": { + "auto_restart_on_version_change": false + } + } +} diff --git a/files/gitlab-ctl-commands/pg-upgrade.rb b/files/gitlab-ctl-commands/pg-upgrade.rb index 889ed9c42ecb61696c0af9237d36e532f564addb_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy9wZy11cGdyYWRlLnJi..64e7dff219b3467e3d28e2095403bc291859ba90_ZmlsZXMvZ2l0bGFiLWN0bC1jb21tYW5kcy9wZy11cGdyYWRlLnJi 100644 --- a/files/gitlab-ctl-commands/pg-upgrade.rb +++ b/files/gitlab-ctl-commands/pg-upgrade.rb @@ -535,7 +535,9 @@ def run_reconfigure unless GitlabCtl::Util.progress_message('Running reconfigure') do - run_chef("#{base_path}/embedded/cookbooks/dna.json").success? + # Disable automatic restart as part of reconfigure to avoid other PGs than + # the one being currently upgraded getting restarted unnecessarily. + run_chef("#{base_path}/embedded/cookbooks/pg-upgrade-config.json").success? end die 'Something went wrong during final reconfiguration, please check the output' end