diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 15:07:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 15:07:33 +0300 |
commit | 6b75320f525f841454f1ab162d141d3610f2e77b (patch) | |
tree | 4971c27759e4fbc18b85e71800c3b9c12346317e /lib/gitlab/metrics/exporter | |
parent | 4226aca420920c1844e8eade4798a2dff188a6fc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/metrics/exporter')
-rw-r--r-- | lib/gitlab/metrics/exporter/sidekiq_exporter.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/gitlab/metrics/exporter/sidekiq_exporter.rb b/lib/gitlab/metrics/exporter/sidekiq_exporter.rb index 4de95edfc18..5ba7b29734b 100644 --- a/lib/gitlab/metrics/exporter/sidekiq_exporter.rb +++ b/lib/gitlab/metrics/exporter/sidekiq_exporter.rb @@ -14,6 +14,29 @@ module Gitlab def log_filename File.join(Rails.root, 'log', 'sidekiq_exporter.log') end + + private + + # Sidekiq Exporter does not work properly in sidekiq-cluster + # mode. It tries to start the service on the same port for + # each of the cluster workers, this results in failure + # due to duplicate binding. + # + # For now we ignore this error, as metrics are still "kind of" + # valid as they are rendered from shared directory. + # + # Issue: https://gitlab.com/gitlab-org/gitlab/issues/5714 + def start_working + super + rescue Errno::EADDRINUSE => e + Sidekiq.logger.error( + class: self.class.to_s, + message: 'Cannot start sidekiq_exporter', + exception: e.message + ) + + false + end end end end |