Fix barbican-api.log rotation issue

The barbican-api process currently writes directly
to its logfile. As such, the logrotate config file
needs a copytruncate directive to ensure the process
doesn't end up writing to the rotated file instead.

Change-Id: I60c8a08ce612fd7f82e05f69b168919b12ab0017
Partial-Bug: 1836632
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney 2019-07-17 11:47:18 -04:00
parent fcb0bf00dc
commit a10438f6c4
3 changed files with 20 additions and 1 deletions

View File

@ -1,2 +1,2 @@
SRC_DIR="src"
TIS_PATCH_VER=90
TIS_PATCH_VER=91

View File

@ -40,6 +40,11 @@ class openstack::barbican
match => '.*workers = .*',
tag => 'modify-workers',
}
file { '/etc/logrotate.d/barbican-api':
ensure => present,
content => template('openstack/barbican-api-logrotate.erb')
}
}
}

View File

@ -0,0 +1,14 @@
# This file is managed by Puppet.
#
# logrotate.d configuration
# Used in rpm build. Keep in sync with debian/barbican-api.logrotate
/var/log/barbican/barbican-api.log {
nodateext
size 10M
start 1
rotate 20
missingok
compress
notifempty
copytruncate
}