Skip to content
Snippets Groups Projects
Commit 29a90af4 authored by Hossein Pursultani's avatar Hossein Pursultani
Browse files

Apply suggestions to files/gitlab-ctl-commands/pg-upgrade.rb

parent cc5f7b5a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -238,7 +238,7 @@ add_command_under_category 'pg-upgrade', 'database',
log "If you do not want to upgrade the PostgreSQL server at this time, enter Ctrl-C and see the documentation for details"
status = GitlabCtl::Util.delay_for(30)
unless status
maintenance_mode('disable')
maintenance_mode('disable') unless patroni_enabled
Kernel.exit(0)
end
end
Loading
Loading
@@ -738,7 +738,7 @@ end
 
def revert_data_dir(version)
if @instance_type == :patroni_replica
run_command("mv #{@db_worker.data_dir} #{@db_worker.data_dir}.#{@db_worker.initial_version}")
run_command("rm -rf #{@db_worker.data_dir}")
run_command("mkdir #{@db_worker.data_dir}")
return
end
Loading
Loading
@@ -780,7 +780,7 @@ def die(message)
$stderr.puts message
revert(@db_worker.initial_version)
$stderr.puts "== Reverted to #{@db_worker.initial_version}. Please check output for what went wrong =="
maintenance_mode('disable')
maintenance_mode('disable') unless service_enabled?('patroni')
exit 1
end
 
Loading
Loading
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