Commit 45a4e248 authored by Rémy Coutable's avatar Rémy Coutable Committed by Robert Speicher

Merge branch 'fix/project-export-error' into 'master'

Add more debug info to import/export and memory killer

This should help debug https://gitlab.com/gitlab-org/gitlab-ce/issues/19124 further

See merge request !5108
(cherry picked from commit b73da895)
parent 0a98f267
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 8.9.5 v 8.9.5
- Add more debug info to import/export and memory killer. !5108
- Fixed avatar alignment in new MR view. !5095 - Fixed avatar alignment in new MR view. !5095
- Fix diff comments not showing up in activity feed. !5069 - Fix diff comments not showing up in activity feed. !5069
- Add index on both Award Emoji user and name. !5061 - Add index on both Award Emoji user and name. !5061
......
...@@ -39,6 +39,8 @@ module Projects ...@@ -39,6 +39,8 @@ module Projects
end end
def cleanup_and_notify def cleanup_and_notify
Rails.logger.error("Import/Export - Project #{project.name} with ID: #{project.id} export error - #{@shared.errors.join(', ')}")
FileUtils.rm_rf(@shared.export_path) FileUtils.rm_rf(@shared.export_path)
notify_error notify_error
...@@ -46,6 +48,8 @@ module Projects ...@@ -46,6 +48,8 @@ module Projects
end end
def notify_success def notify_success
Rails.logger.info("Import/Export - Project #{project.name} with ID: #{project.id} successfully exported")
notification_service.project_exported(@project, @current_user) notification_service.project_exported(@project, @current_user)
end end
......
...@@ -28,7 +28,8 @@ module Gitlab ...@@ -28,7 +28,8 @@ module Gitlab
end end
def execute(cmd) def execute(cmd)
_output, status = Gitlab::Popen.popen(cmd) output, status = Gitlab::Popen.popen(cmd)
@shared.error(output.to_s) unless status.zero?
status.zero? status.zero?
end end
......
...@@ -17,6 +17,7 @@ module Gitlab ...@@ -17,6 +17,7 @@ module Gitlab
Rails.logger.info("Saved project export #{archive_file}") Rails.logger.info("Saved project export #{archive_file}")
archive_file archive_file
else else
@shared.error("Unable to save #{archive_file} into #{@shared.export_path}")
false false
end end
rescue => e rescue => e
......
...@@ -29,11 +29,11 @@ module Gitlab ...@@ -29,11 +29,11 @@ module Gitlab
"in #{GRACE_TIME} seconds" "in #{GRACE_TIME} seconds"
sleep(GRACE_TIME) sleep(GRACE_TIME)
Sidekiq.logger.warn "sending SIGTERM to PID #{Process.pid}" Sidekiq.logger.warn "sending SIGTERM to PID #{Process.pid} - Worker #{worker.class} - JID-#{job['jid']}"
Process.kill('SIGTERM', Process.pid) Process.kill('SIGTERM', Process.pid)
Sidekiq.logger.warn "waiting #{SHUTDOWN_WAIT} seconds before sending "\ Sidekiq.logger.warn "waiting #{SHUTDOWN_WAIT} seconds before sending "\
"#{SHUTDOWN_SIGNAL} to PID #{Process.pid}" "#{SHUTDOWN_SIGNAL} to PID #{Process.pid} - Worker #{worker.class} - JID-#{job['jid']}"
sleep(SHUTDOWN_WAIT) sleep(SHUTDOWN_WAIT)
Sidekiq.logger.warn "sending #{SHUTDOWN_SIGNAL} to PID #{Process.pid} - Worker #{worker.class} - JID-#{job['jid']}" Sidekiq.logger.warn "sending #{SHUTDOWN_SIGNAL} to PID #{Process.pid} - Worker #{worker.class} - JID-#{job['jid']}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment