Skip to content
Snippets Groups Projects
Commit 1ea2fea4 authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Merge branch '4395-promote-to-primary-node-silently-fails-while-reconfiguring' into 'master'

Output the stdout of the sub-tasks when running promote-to-primary

See merge request gitlab-org/omnibus-gitlab!2216
parents 884a4236 f73a46a2
No related branches found
No related tags found
No related merge requests found
......@@ -76,10 +76,10 @@
puts 'Reconfiguring...'.color(:yellow)
puts
run_command('gitlab-ctl reconfigure')
run_command('gitlab-ctl reconfigure', live: true)
end
def promote_to_primary
puts
puts 'Running gitlab-rake geo:set_secondary_as_primary...'.color(:yellow)
puts
......@@ -80,9 +80,10 @@
end
def promote_to_primary
puts
puts 'Running gitlab-rake geo:set_secondary_as_primary...'.color(:yellow)
puts
run_command('gitlab-rake geo:set_secondary_as_primary')
run_command('gitlab-rake geo:set_secondary_as_primary', live: true)
end
......@@ -87,7 +88,7 @@
end
def run_command(cmd)
GitlabCtl::Util.run_command(cmd)
def run_command(cmd, live: false)
GitlabCtl::Util.run_command(cmd, live: live)
end
def key_path
......
......@@ -28,7 +28,9 @@
it 'calls all the subcommands' do
stub_env
is_expected.to receive(:run_command).exactly(3).times
is_expected.to receive(:run_command).with('gitlab-ctl reconfigure', live: true).once
is_expected.to receive(:run_command).with('gitlab-rake geo:set_secondary_as_primary', live: true).once
is_expected.to receive(:run_command).with("touch #{postgres_trigger_file_path}").once
command.execute
end
......
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