diff options
author | Nick Thomas <nick@gitlab.com> | 2017-09-18 17:13:49 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-09-19 11:05:42 +0100 |
commit | b00aaeced7b5ab8926ae4633d4d8c3512d168589 (patch) | |
tree | 3d24dd2d082786edc52d098d9a214fe7ffb73f24 | |
parent | 1f4911541d03a257c38a63c6aa36a1c7ca4c3b43 (diff) | |
download | gitlab-ce-b00aaeced7b5ab8926ae4633d4d8c3512d168589.tar.gz |
Fix the filesystem shard health check to check all configured shards
-rw-r--r-- | changelogs/unreleased/37999-fix-circuit-breaker.yml | 5 | ||||
-rw-r--r-- | lib/gitlab/health_checks/fs_shards_check.rb | 2 | ||||
-rw-r--r-- | spec/controllers/health_controller_spec.rb | 1 |
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 |