diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-02-28 18:08:40 -0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-03-03 12:13:30 -0300 |
commit | 0b9d56f960e272047ac749cff7a29f2b5f03f7a5 (patch) | |
tree | ec25403e7adef92710f6e37996e4ca3439ee46c6 /lib/backup | |
parent | f9aae510d9d917eda1ad3970f7989fb7d4e74f2c (diff) | |
download | gitlab-ce-0b9d56f960e272047ac749cff7a29f2b5f03f7a5.tar.gz |
Update storage settings to allow extra values per shard28447-hybrid-repository-storages
This will be necessary when adding gitaly settings. This version
doesn't make any functional changes, but allows us to include this
breaking change in 9.0 and add the needed extra settings in the future
with backwards compatibility
Diffstat (limited to 'lib/backup')
-rw-r--r-- | lib/backup/repository.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb index d16d5ba4960..9e8716b8f6f 100644 --- a/lib/backup/repository.rb +++ b/lib/backup/repository.rb @@ -68,7 +68,8 @@ module Backup end def restore - Gitlab.config.repositories.storages.each do |name, path| + Gitlab.config.repositories.storages.each do |name, repository_storage| + path = repository_storage['path'] next unless File.exist?(path) # Move repos dir to 'repositories.old' dir @@ -200,7 +201,7 @@ module Backup private def repository_storage_paths_args - Gitlab.config.repositories.storages.values + Gitlab.config.repositories.storages.values.map { |rs| rs['path'] } end end end |