summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-09-19 11:36:51 +0000
committerDouwe Maan <douwe@gitlab.com>2017-09-19 11:36:51 +0000
commit4c6c105909ea610eac760b05e66d9efc57cbb43c (patch)
tree9be9635992c645c8eeca061895f1642714a5549d
parent2973c1b2aab39e53ac0b033e03c21c85f1f0bd53 (diff)
parentb00aaeced7b5ab8926ae4633d4d8c3512d168589 (diff)
downloadgitlab-ce-4c6c105909ea610eac760b05e66d9efc57cbb43c.tar.gz
Merge branch '37999-fix-circuit-breaker' into 'master'
Fix the filesystem shard health check to check all configured shards Closes #37999 See merge request gitlab-org/gitlab-ce!14341
-rw-r--r--changelogs/unreleased/37999-fix-circuit-breaker.yml5
-rw-r--r--lib/gitlab/health_checks/fs_shards_check.rb2
-rw-r--r--spec/controllers/health_controller_spec.rb1
3 files changed, 7 insertions, 1 deletions
diff --git a/changelogs/unreleased/37999-fix-circuit-breaker.yml b/changelogs/unreleased/37999-fix-circuit-breaker.yml
new file mode 100644
index 00000000000..a75315c4988
--- /dev/null
+++ b/changelogs/unreleased/37999-fix-circuit-breaker.yml
@@ -0,0 +1,5 @@
+---
+title: Fix the filesystem shard health check to check all configured shards
+merge_request: 14341
+author:
+type: fixed
diff --git a/lib/gitlab/health_checks/fs_shards_check.rb b/lib/gitlab/health_checks/fs_shards_check.rb
index eef97f54962..a533d4364ef 100644
--- a/lib/gitlab/health_checks/fs_shards_check.rb
+++ b/lib/gitlab/health_checks/fs_shards_check.rb
@@ -58,7 +58,7 @@ module Gitlab
end
def repository_storages
- @repository_storage ||= Gitlab::CurrentSettings.current_application_settings.repository_storages
+ @repository_storage ||= storages_paths.keys
end
def storages_paths
diff --git a/spec/controllers/health_controller_spec.rb b/spec/controllers/health_controller_spec.rb
index cc389e554ad..9e9cf4f2c1f 100644
--- a/spec/controllers/health_controller_spec.rb
+++ b/spec/controllers/health_controller_spec.rb
@@ -10,6 +10,7 @@ describe HealthController do
before do
allow(Settings.monitoring).to receive(:ip_whitelist).and_return([whitelisted_ip])
+ stub_storage_settings({}) # Hide the broken storage
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
end