f329af7dfa
Currently we generate a logrotate configuration file for each enabled service. These are then included from a logrotate.d directory. With a large number of hosts, this can take a long time to template. Benchmarking of templating is available at [1]. This change switches to a single logrotate configuration file for all services, with the include done locally using jinja. This should drastically improve the performance of this task. [1] https://github.com/stackhpc/ansible-scaling/blob/master/doc/template.md Partially-Implements: blueprint performance-improvements Change-Id: I39cfa70bef6560f615cad516c43aaef6a523b964
25 lines
310 B
Django/Jinja
25 lines
310 B
Django/Jinja
{{ cron_logrotate_rotation_interval }}
|
|
|
|
rotate {{ cron_logrotate_rotation_count }}
|
|
|
|
copytruncate
|
|
|
|
compress
|
|
|
|
delaycompress
|
|
|
|
notifempty
|
|
|
|
missingok
|
|
|
|
minsize 30M
|
|
|
|
maxsize 100M
|
|
|
|
su root kolla
|
|
|
|
{% for service in cron_logrotate_enabled_services %}
|
|
{% include "cron-logrotate-" ~ service ~ ".conf.j2" %}
|
|
|
|
{% endfor %}
|