You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add logrotate::rule w/ rotate_every => 'hour' to a system running logrotate < v3.8.5
Puppet lays down the rule, including an hourly directive
Run that config through logrotate
What are you seeing
An error like:
# logrotate -f /etc/logrotate.d/hourly/nginx
error: /etc/logrotate.d/hourly/nginx:9 unknown option 'hourly' -- ignoring line
error: found error in /var/log/nginx.log , skipping
What behaviour did you expect instead
Puppet to not add the hourly directive on a system running an older version of logrotate that does not support the hourly directive.
Output log
n/a
Any additional information you'd like to impart
This affects distros like CentOS 6, which ships with an older logrotate 3.7.8. This is not an issue on CentOS 7, for example, which ships with logrotate 3.8.6. The hourly directive was added in logrotate 3.8.5:
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
logrotate::rule
w/rotate_every => 'hour'
to a system running logrotate < v3.8.5hourly
directiveWhat are you seeing
An error like:
What behaviour did you expect instead
Puppet to not add the
hourly
directive on a system running an older version of logrotate that does not support thehourly
directive.Output log
n/a
Any additional information you'd like to impart
This affects distros like CentOS 6, which ships with an older logrotate 3.7.8. This is not an issue on CentOS 7, for example, which ships with logrotate 3.8.6. The
hourly
directive was added in logrotate 3.8.5:https://github.com/logrotate/logrotate/blob/master/ChangeLog.md#385---2013-06-10
Older systems, like CentOS 6, implement hourly jobs via cron.
The text was updated successfully, but these errors were encountered: