BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
059e11d8
Commit
059e11d8
authored
Mar 27, 2017
by
Robin Bobbitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix race condition in namespace directory creation
parent
2faf955c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
namespace-race-condition.yml
changelogs/unreleased/namespace-race-condition.yml
+4
-0
shell.rb
lib/gitlab/shell.rb
+4
-1
No files found.
changelogs/unreleased/namespace-race-condition.yml
0 → 100644
View file @
059e11d8
---
title
:
Fix project creation failure due to race condition in namespace directory creation
merge_request
:
10268
author
:
Robin Bobbitt
lib/gitlab/shell.rb
View file @
059e11d8
...
...
@@ -174,7 +174,10 @@ module Gitlab
# add_namespace("/path/to/storage", "gitlab")
#
def
add_namespace
(
storage
,
name
)
FileUtils
.
mkdir_p
(
full_path
(
storage
,
name
),
mode:
0770
)
unless
exists?
(
storage
,
name
)
path
=
full_path
(
storage
,
name
)
FileUtils
.
mkdir_p
(
path
,
mode:
0770
)
unless
exists?
(
storage
,
name
)
rescue
Errno
::
EEXIST
=>
e
Rails
.
logger
.
warn
(
"Directory exists as a file:
#{
e
}
at:
#{
path
}
"
)
end
# Remove directory from repositories storage
...
...
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