Skip to content
Snippets Groups Projects
Commit a8b13ff765f6 authored by Ian Baum's avatar Ian Baum
Browse files

Merge branch 'fix-logic-error-in-praefect-election' into 'master'

Fix an error where reconfigure would swap the praefect election strategy

See merge request gitlab-org/omnibus-gitlab!5260
No related branches found
No related tags found
2 merge requests!51Validate shift of Heptapod 0.25 to oldstable series,!41GitLab 13.12
......@@ -17,7 +17,7 @@
config_path = File.join(praefect_dir, 'config.toml')
begin
per_repository_configured = File.foreach(config_path).include?("election_strategy = 'per_repository'")
per_repository_configured = !File.foreach(config_path).grep(/election_strategy = 'per_repository'/).empty?
# The previous behavior was to use 'sql' election strategy unless something else was explicitly configured.
# Given that, it's fine to fallback to 'sql' if the config does not contain 'per_repository'
# election strategy. If the config contains 'per_repository' but the value was not explicitly set, then we've
......
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