summaryrefslogtreecommitdiff
path: root/lib/system_check
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-06-05 17:58:28 +0200
committerJacob Vosmaer <jacob@gitlab.com>2018-06-12 14:33:37 +0200
commitf376347f24f24efc157d80de63381dd22d060630 (patch)
tree73dc59fbab206b2c5e79e6144b4d02c931da92a0 /lib/system_check
parentb2ef7f6cd9b98681aeb2274e29f0b3aaac423fc9 (diff)
downloadgitlab-ce-f376347f24f24efc157d80de63381dd22d060630.tar.gz
Find and mark more Git disk access locations, part 2
Diffstat (limited to 'lib/system_check')
-rw-r--r--lib/system_check/orphans/namespace_check.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/system_check/orphans/namespace_check.rb b/lib/system_check/orphans/namespace_check.rb
index b5f443abe06..09b57c7b408 100644
--- a/lib/system_check/orphans/namespace_check.rb
+++ b/lib/system_check/orphans/namespace_check.rb
@@ -4,13 +4,15 @@ module SystemCheck
set_name 'Orphaned namespaces:'
def multi_check
- Gitlab.config.repositories.storages.each do |storage_name, repository_storage|
- $stdout.puts
- $stdout.puts "* Storage: #{storage_name} (#{repository_storage.legacy_disk_path})".color(:yellow)
- toplevel_namespace_dirs = disk_namespaces(repository_storage.legacy_disk_path)
-
- orphans = (toplevel_namespace_dirs - existing_namespaces)
- print_orphans(orphans, storage_name)
+ Gitlab::GitalyClient::StorageSettings.allow_disk_access do
+ Gitlab.config.repositories.storages.each do |storage_name, repository_storage|
+ $stdout.puts
+ $stdout.puts "* Storage: #{storage_name} (#{repository_storage.legacy_disk_path})".color(:yellow)
+ toplevel_namespace_dirs = disk_namespaces(repository_storage.legacy_disk_path)
+
+ orphans = (toplevel_namespace_dirs - existing_namespaces)
+ print_orphans(orphans, storage_name)
+ end
end
clear_namespaces! # releases memory when check finishes