Commit 9d9493c8d893195490fe3e1e62e7daa5e1b2e7ba
Exists in
master
and in
4 other branches
Merge pull request #1582 from Kouno/nfs-fix
Fix deletion of tmp/gitlabhq-gitolite* folders in a NFS environment.
Showing
1 changed file
with
9 additions
and
5 deletions
Show diff stats
lib/gitlab/backend/gitolite_config.rb
| ... | ... | @@ -40,18 +40,22 @@ module Gitlab |
| 40 | 40 | |
| 41 | 41 | # Save changes in |
| 42 | 42 | # gitolite-admin repo |
| 43 | - # before pusht it | |
| 43 | + # before push it | |
| 44 | 44 | ga_repo.save |
| 45 | 45 | |
| 46 | 46 | # Push gitolite-admin repo |
| 47 | 47 | # to apply all changes |
| 48 | 48 | push(config_tmp_dir) |
| 49 | - | |
| 49 | + ensure | |
| 50 | 50 | # Remove tmp dir |
| 51 | - # wiith gitolite-admin | |
| 51 | + # removing the gitolite folder first is important to avoid | |
| 52 | + # NFS issues. | |
| 53 | + FileUtils.rm_rf(File.join(config_tmp_dir, 'gitolite')) | |
| 54 | + | |
| 55 | + # Remove parent tmp dir | |
| 52 | 56 | FileUtils.rm_rf(config_tmp_dir) |
| 53 | - ensure | |
| 54 | - # unlock so other task cann access | |
| 57 | + | |
| 58 | + # Unlock so other task can access | |
| 55 | 59 | # gitolite configuration |
| 56 | 60 | f.flock(File::LOCK_UN) |
| 57 | 61 | end | ... | ... |