Add option for enabling rsyslog reopenOnTruncate

reopenOnTruncate ensures rsyslog immediately recognizes when a logrotation happens on a file. When not on, rsyslog will wait for a log file to fill to its original capacity before consuming any additional logs.

Setting this here will ensure that every service configured to work with rsyslog will have this parameter. Default to off because this is an experimental feature

Depends-On: https://review.opendev.org/c/openstack/puppet-tripleo/+/790154
Change-Id: Iba6a0da80cb75a93537a014dba8e77032101e570
This commit is contained in:
Paul Leimer 2021-05-06 16:24:00 -04:00
parent 2732d826c8
commit 4872e36c0a

View File

@ -34,6 +34,10 @@ parameters:
default: {}
description: Parameters specific to the role
type: json
RsyslogReopenOnTruncate:
default: false
description: Rsyslog imfile reopenOnTruncate parameter
type: boolean
RsyslogElasticsearchSetting:
default: {}
description: Configuration for rsyslog-elasticsearch plugin
@ -81,8 +85,6 @@ conditions:
use_amqp1:
not:
equals: [{get_param: RsyslogAmqp1Setting}, {}]
outputs:
role_data:
description: Role data for the rsyslog role.
@ -202,6 +204,10 @@ outputs:
dynSearchIndex: "on"
errorfile: '/var/log/rsyslog/omelasticsearch.log'
- {}
- if:
- {get_param: RsyslogReopenOnTruncate}
- tripleo::profile::base::logging::rsyslog::reopen_on_truncate: "on"
- {}
- if:
- use_amqp1
- tripleo::profile::base::logging::rsyslog::amqp1: