summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2019-06-28 10:28:28 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2019-06-28 10:30:40 +0200
commitcb4a514207c914069410a01de8b493076156752a (patch)
tree272bd9284b7af3aae3ceef6e6568a8fc7976acd0 /config
parentb0845b6293cc31f29583116ab583e77aad6a892f (diff)
downloadgitlab-ce-cb4a514207c914069410a01de8b493076156752a.tar.gz
Remove ignored circuit_breaker columns
The circuit breaker itself got removed a while ago, when that happened some parts got left behind. Using grep old stale settings and validations were found and are now removed.
Diffstat (limited to 'config')
-rw-r--r--config/initializers/6_validations.rb21
1 files changed, 6 insertions, 15 deletions
diff --git a/config/initializers/6_validations.rb b/config/initializers/6_validations.rb
index bf9e5a50382..827b15e5c8d 100644
--- a/config/initializers/6_validations.rb
+++ b/config/initializers/6_validations.rb
@@ -1,24 +1,15 @@
-def storage_name_valid?(name)
- !!(name =~ /\A[a-zA-Z0-9\-_]+\z/)
-end
-
def storage_validation_error(message)
raise "#{message}. Please fix this in your gitlab.yml before starting GitLab."
end
def validate_storages_config
- storage_validation_error('No repository storage path defined') if Gitlab.config.repositories.storages.empty?
-
- Gitlab.config.repositories.storages.each do |name, repository_storage|
- storage_validation_error("\"#{name}\" is not a valid storage name") unless storage_name_valid?(name)
-
- %w(failure_count_threshold failure_reset_time storage_timeout).each do |setting|
- # Falling back to the defaults is fine!
- next if repository_storage[setting].nil?
+ if Gitlab.config.repositories.storages.empty?
+ storage_validation_error('No repository storage path defined')
+ end
- unless repository_storage[setting].to_f > 0
- storage_validation_error("`#{setting}` for storage `#{name}` needs to be greater than 0")
- end
+ Gitlab.config.repositories.storages.keys.each do |name|
+ unless /\A[a-zA-Z0-9\-_]+\z/.match?(name)
+ storage_validation_error("\"#{name}\" is not a valid storage name")
end
end
end