Adjust logrotate configuration to use date suffix
Change-Id: I268bf01030b2bfa5fc998d2479f90fe11212443a
Closes-bug: #1618487
(cherry picked from commit 90419d9f8a
)
This commit is contained in:
parent
c5c37521b6
commit
fdcf1dd636
|
@ -75,6 +75,12 @@ class openstack::logrotate (
|
|||
after => '^minsize',
|
||||
}
|
||||
|
||||
file_line { 'logrotate-date-extension':
|
||||
line => 'dateformat -%Y%m%d-%s',
|
||||
match => '^dateformat ',
|
||||
after => '^dateext',
|
||||
}
|
||||
|
||||
if $debug {
|
||||
$interval = '10'
|
||||
} else {
|
||||
|
|
|
@ -31,7 +31,8 @@ describe 'openstack::logrotate' do
|
|||
'logrotate-compress',
|
||||
'logrotate-delaycompress',
|
||||
'logrotate-minsize',
|
||||
'logrotate-maxsize',].each do |item|
|
||||
'logrotate-maxsize',
|
||||
'logrotate-date-extension',].each do |item|
|
||||
should contain_file_line(item)
|
||||
end
|
||||
should contain_cron('fuel-logrotate').with_minute('*/30')
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
notifempty
|
||||
|
||||
# logrotate allows to use only year, month, day and unix epoch
|
||||
dateext
|
||||
dateformat -%Y%m%d-%s
|
||||
|
||||
# number of rotated files to keep
|
||||
|
|
Loading…
Reference in New Issue