Admin Area > Logs page assumes all log files are local, breaking in HA / containerized

Summary

Exposed when investigating https://gitlab.com/charts/gitlab/issues/863

The Admin Area > Logs page assumes that all log files are accessible from the local filesystem. This is not an accurate assumption in HA / containerized environment.

Steps to reproduce

Configure HA nodes (split roles for Sidekiq / Unicorn), or cloud native GitLab containers (uses separate containers). Ensure multiple Unicorn instances.

What is the current bug behavior?

Sidekiq: sidekiq.log, repocheck.log

  1. Sidekiq runs on a separate node/container
  2. Sidekiq does not share a filesystem with the Unicorn/Rails node/container
  3. No Unicorn instance can not access these logs

Unicorn: application.log, production.log, integrations_json.log

  1. Multiple nodes/containers
  2. One log each
  3. You will see different results based upon which node you reach

Intentionally "broken" repository

Screenshot_20181023_140240

Admin Area > Logs, repocheck.log

Screenshot_20181023_140401

What is the expected correct behavior?

This UI should present with viable content, or possibly point to appropriate documentation on how to access logs.

Related code

  • https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/logger.rb
  • https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/repository_check_logger.rb
  • https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/admin/application_settings/_repository_check.html.haml
  • https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/controllers/admin/logs_controller.rb
Assignee Loading
Time tracking Loading