Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e9e9da82
Commit
e9e9da82
authored
Jun 20, 2018
by
Jacob Vosmaer (GitLab)
Committed by
Douwe Maan
Jun 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More gitaly disk access blocks
parent
329b0067
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
1 deletion
+9
-1
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-0
app/models/repository.rb
app/models/repository.rb
+4
-1
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-0
config/initializers/6_validations.rb
config/initializers/6_validations.rb
+1
-0
lib/gitlab/health_checks/fs_shards_check.rb
lib/gitlab/health_checks/fs_shards_check.rb
+1
-0
lib/gitlab/setup_helper.rb
lib/gitlab/setup_helper.rb
+1
-0
No files found.
app/helpers/projects_helper.rb
View file @
e9e9da82
...
@@ -407,6 +407,7 @@ module ProjectsHelper
...
@@ -407,6 +407,7 @@ module ProjectsHelper
@ref
||
@repository
.
try
(
:root_ref
)
@ref
||
@repository
.
try
(
:root_ref
)
end
end
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1235
def
sanitize_repo_path
(
project
,
message
)
def
sanitize_repo_path
(
project
,
message
)
return
''
unless
message
.
present?
return
''
unless
message
.
present?
...
...
app/models/repository.rb
View file @
e9e9da82
...
@@ -154,7 +154,10 @@ class Repository
...
@@ -154,7 +154,10 @@ class Repository
# Returns a list of commits that are not present in any reference
# Returns a list of commits that are not present in any reference
def
new_commits
(
newrev
)
def
new_commits
(
newrev
)
refs
=
::
Gitlab
::
Git
::
RevList
.
new
(
raw
,
newrev:
newrev
).
new_refs
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1233
refs
=
Gitlab
::
GitalyClient
::
StorageSettings
.
allow_disk_access
do
::
Gitlab
::
Git
::
RevList
.
new
(
raw
,
newrev:
newrev
).
new_refs
end
refs
.
map
{
|
sha
|
commit
(
sha
.
strip
)
}
refs
.
map
{
|
sha
|
commit
(
sha
.
strip
)
}
end
end
...
...
config/initializers/1_settings.rb
View file @
e9e9da82
...
@@ -394,6 +394,7 @@ repositories_storages = Settings.repositories.storages.values
...
@@ -394,6 +394,7 @@ repositories_storages = Settings.repositories.storages.values
repository_downloads_path
=
Settings
.
gitlab
[
'repository_downloads_path'
].
to_s
.
gsub
(
%r{/$}
,
''
)
repository_downloads_path
=
Settings
.
gitlab
[
'repository_downloads_path'
].
to_s
.
gsub
(
%r{/$}
,
''
)
repository_downloads_full_path
=
File
.
expand_path
(
repository_downloads_path
,
Settings
.
gitlab
[
'user_home'
])
repository_downloads_full_path
=
File
.
expand_path
(
repository_downloads_path
,
Settings
.
gitlab
[
'user_home'
])
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1237
Gitlab
::
GitalyClient
::
StorageSettings
.
allow_disk_access
do
Gitlab
::
GitalyClient
::
StorageSettings
.
allow_disk_access
do
if
repository_downloads_path
.
blank?
||
repositories_storages
.
any?
{
|
rs
|
[
repository_downloads_path
,
repository_downloads_full_path
].
include?
(
rs
.
legacy_disk_path
.
gsub
(
%r{/$}
,
''
))
}
if
repository_downloads_path
.
blank?
||
repositories_storages
.
any?
{
|
rs
|
[
repository_downloads_path
,
repository_downloads_full_path
].
include?
(
rs
.
legacy_disk_path
.
gsub
(
%r{/$}
,
''
))
}
Settings
.
gitlab
[
'repository_downloads_path'
]
=
File
.
join
(
Settings
.
shared
[
'path'
],
'cache/archive'
)
Settings
.
gitlab
[
'repository_downloads_path'
]
=
File
.
join
(
Settings
.
shared
[
'path'
],
'cache/archive'
)
...
...
config/initializers/6_validations.rb
View file @
e9e9da82
...
@@ -37,6 +37,7 @@ def validate_storages_config
...
@@ -37,6 +37,7 @@ def validate_storages_config
end
end
end
end
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1237
def
validate_storages_paths
def
validate_storages_paths
Gitlab
::
GitalyClient
::
StorageSettings
.
allow_disk_access
do
Gitlab
::
GitalyClient
::
StorageSettings
.
allow_disk_access
do
Gitlab
.
config
.
repositories
.
storages
.
each
do
|
name
,
repository_storage
|
Gitlab
.
config
.
repositories
.
storages
.
each
do
|
name
,
repository_storage
|
...
...
lib/gitlab/health_checks/fs_shards_check.rb
View file @
e9e9da82
module
Gitlab
module
Gitlab
module
HealthChecks
module
HealthChecks
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1218
class
FsShardsCheck
class
FsShardsCheck
extend
BaseAbstractCheck
extend
BaseAbstractCheck
RANDOM_STRING
=
SecureRandom
.
hex
(
1000
).
freeze
RANDOM_STRING
=
SecureRandom
.
hex
(
1000
).
freeze
...
...
lib/gitlab/setup_helper.rb
View file @
e9e9da82
...
@@ -24,6 +24,7 @@ module Gitlab
...
@@ -24,6 +24,7 @@ module Gitlab
address
=
val
[
'gitaly_address'
]
address
=
val
[
'gitaly_address'
]
end
end
# https://gitlab.com/gitlab-org/gitaly/issues/1238
Gitlab
::
GitalyClient
::
StorageSettings
.
allow_disk_access
do
Gitlab
::
GitalyClient
::
StorageSettings
.
allow_disk_access
do
storages
<<
{
name:
key
,
path:
val
.
legacy_disk_path
}
storages
<<
{
name:
key
,
path:
val
.
legacy_disk_path
}
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment