Skip to content
Snippets Groups Projects
Commit 12d1cf15 authored by DJ Mountney's avatar DJ Mountney
Browse files

Merge branch '5610-migrations-can-silently-fail-during-deployments' into 'master'

Resolve "Migrations can silently fail during deployments"

Closes #5610

See merge request gitlab-org/omnibus-gitlab!4591
parents a09ded4a 21998e17
No related branches found
No related tags found
No related merge requests found
---
title: Exit non-zero during upgrade if reconfigure fails
merge_request: 4591
author:
type: fixed
Loading
Loading
@@ -15,6 +15,8 @@
# limitations under the License.
#
 
require 'rainbow/ext/string'
require "#{base_path}/embedded/service/omnibus-ctl/lib/gitlab_ctl"
 
# For testing purposes, if the first path cannot be found load the second
Loading
Loading
@@ -118,7 +120,17 @@ add_command 'upgrade', 'Run migrations after a package upgrade', 1 do |cmd_name|
run_command("rm -rf #{local_mode_cache_path}")
 
log 'Reconfigure GitLab to apply migrations'
reconfigure(false) # sending 'false' mans "don't quit afterwards"
results = reconfigure
if results != 0
message = <<~EOF
===
There was an error running gitlab-ctl reconfigure. Please check the output above for more
details.
===
EOF
warn(message.color(:red))
::Kernel.exit results
end
 
log 'Restarting previously running GitLab services'
get_all_services.each do |sv_name|
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