From b00aaeced7b5ab8926ae4633d4d8c3512d168589 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Mon, 18 Sep 2017 17:13:49 +0100 Subject: Fix the filesystem shard health check to check all configured shards --- changelogs/unreleased/37999-fix-circuit-breaker.yml | 5 +++++ lib/gitlab/health_checks/fs_shards_check.rb | 2 +- spec/controllers/health_controller_spec.rb | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/37999-fix-circuit-breaker.yml 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 -- cgit v1.2.1