Commit graph

12 commits

Author SHA1 Message Date
Yorick Peterse
ff28a7cc36 Moved cache expiration code to Repository hooks
This keeps all the cache expiration code in a single file/class instead
of spreading it all across the codebase.
2016-02-23 12:02:59 +01:00
Yorick Peterse
b1203108b0 Flush all repository caches when deleting a repo
This ensures that _all_ caches (including any caches normally only
flushed under certain conditions) are flushed whenever a project is
removed. Because cache keys are based on project namespaces (excluding
IDs) not doing so could result in a newly created project re-using old
caches (if the project was re-created using the same name).
2016-02-17 11:38:18 +01:00
Josh Frye
91b9cbff8d First pass at deleting projects in the background. 2016-01-29 09:14:16 -05:00
Dmitriy Zaporozhets
3e259ea8bc Revert "Merge branch 'revert-satellites' into 'master' "
This reverts commit 5daf44b7c8, reversing
changes made to 2f706fbd23.
2015-08-11 14:33:31 +02:00
Dmitriy Zaporozhets
9f10943c1a
Revert "Merge branch 'drop-satellites'"
This reverts commit 957e849f41, reversing
changes made to 6b9dbe9f5a.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-11 10:28:42 +02:00
Dmitriy Zaporozhets
a87989fb7d Remove satellites 2015-07-15 15:45:57 +02:00
Dmitriy Zaporozhets
53a0ac4734
Skip repo removing whem remove user or group
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 16:16:27 +02:00
Dmitriy Zaporozhets
58ab8a4a9d
Fix tests and increase delay time before remove repository
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 15:09:12 +02:00
Dmitriy Zaporozhets
97ff86e07c Move repository when project is removed
Ths commit does next:

* When we remove project we move repository to path+deleted.git
* Then we schedule removal of path+deleted with sidekiq
* If repository move failed we abort project removal

This should help us with NFS issue when project get removed but
repository stayed. The full explanation of problem is below:

* rm -rf project.git
* rm -rf removes project.git/objects/foo
* NFS server renames foo to foo.nfsXXXX because some NFS client (think
* Unicorn) still has the file open
* rm -rf exits, but project.git/objects/foo.nfsXXX still exists
* Unicorn closes the file, the NFS client closes the file (foo), and the
* NFS server removes foo.nfsXXX
* the directory project.git/objects/ still exists => problem

So now we move repository and even if repository removal failed

Repository directory is moved so no bugs with project removed but
repository directory taken. User still able to create new project with
same name. From administrator perspective you can easily find stalled
repositories by searching `*+deleted.git`

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 13:05:43 +02:00
Dmitriy Zaporozhets
73f91da8b1 Fix project deletion and tests 2014-06-17 23:49:17 +03:00
Dmitriy Zaporozhets
a7d5052cd4 Remove SystemHook observer 2014-06-17 22:20:10 +03:00
Dmitriy Zaporozhets
a7f3672b75 Remove project observer 2014-06-17 21:53:26 +03:00