Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-26 00:06:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-26 00:06:28 +0300
commiteb7390edf3afd52174b786fff1e06d5ffae0cec5 (patch)
tree395dce44e5ea2b55704414e4d38fc24da4b1b676 /lib/gitlab/gpg.rb
parent801ced25ff0540b096c395f9ac8d2d9e005878e8 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/gpg.rb')
-rw-r--r--lib/gitlab/gpg.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/gitlab/gpg.rb b/lib/gitlab/gpg.rb
index 1dce26efc65..829e64b11a4 100644
--- a/lib/gitlab/gpg.rb
+++ b/lib/gitlab/gpg.rb
@@ -5,7 +5,7 @@ module Gitlab
extend self
CleanupError = Class.new(StandardError)
- BG_CLEANUP_RUNTIME_S = 2
+ BG_CLEANUP_RUNTIME_S = 10
FG_CLEANUP_RUNTIME_S = 0.5
MUTEX = Mutex.new
@@ -107,19 +107,18 @@ module Gitlab
begin
cleanup_tmp_dir(tmp_dir)
rescue CleanupError => e
+ folder_contents = Dir.children(tmp_dir)
# This means we left a GPG-agent process hanging. Logging the problem in
# sentry will make this more visible.
Gitlab::Sentry.track_exception(e,
issue_url: 'https://gitlab.com/gitlab-org/gitlab/issues/20918',
- extra: { tmp_dir: tmp_dir })
+ extra: { tmp_dir: tmp_dir, contents: folder_contents })
end
tmp_keychains_removed.increment unless File.exist?(tmp_dir)
end
def cleanup_tmp_dir(tmp_dir)
- return FileUtils.remove_entry(tmp_dir, true) if Feature.disabled?(:gpg_cleanup_retries)
-
# Retry when removing the tmp directory failed, as we may run into a
# race condition:
# The `gpg-agent` agent process may clean up some files as well while