no log rotation for gitaly_hooks.log and gitlab-shell.log in /var/log/gitlab/gitaly

Summary

logrotate has no profile for .log files created in the gitaly folder.

# ls -al /var/log/gitlab/gitaly/*log
-rw-r--r--. 1 git git    0 Dec 23 10:34 /var/log/gitlab/gitaly/gitaly_hooks.log
-rw-r--r--. 1 git git 3833 Dec 23 20:50 /var/log/gitlab/gitaly/gitlab-shell.log
# grep log\/gitlab /var/opt/gitlab/logrotate/logrotate.d/*
/var/opt/gitlab/logrotate/logrotate.d/gitlab-pages:/var/log/gitlab/gitlab-pages/*.log {
/var/opt/gitlab/logrotate/logrotate.d/gitlab-rails:/var/log/gitlab/gitlab-rails/*.log {
/var/opt/gitlab/logrotate/logrotate.d/gitlab-shell:/var/log/gitlab/gitlab-shell//*.log {
/var/opt/gitlab/logrotate/logrotate.d/gitlab-workhorse:/var/log/gitlab/gitlab-workhorse/*.log {
/var/opt/gitlab/logrotate/logrotate.d/nginx:/var/log/gitlab/nginx/*.log {
/var/opt/gitlab/logrotate/logrotate.d/unicorn:/var/log/gitlab/unicorn/*.log {

In searching for this, I found this issue

  • Relates to incorrect ownership of gitlab-shell.log.
  • Something to bear in mind as part of adding logrotate.

Steps to reproduce

Create either of these logs

What is the current bug behavior?

They don't get logrotated.

What is the expected correct behavior?

They should be rotated like the unicorn, rails, nginx logs etc.

Relevant logs

Relevant logs

Details of package version

gitlab-ee-12.5.4-ee.0.el7.x86_64

Provide the package version installation details

Code

Logrotate config is made from a template

The list is here and I guess needs 'gitaly' being added.

Edited Dec 24, 2019 by Ben Prescott (ex-GitLab)
Assignee Loading
Time tracking Loading