How to force kolla-ansible to rotate logs with given interval [kolla-ansible]

Adam Tomas bkslash at poczta.onet.pl
Mon Oct 18 08:19:19 UTC 2021


Hi,
different services in kolla-ansible have different log rotation policies and I’d like to make the logs easier to maintain and search (tried central logging with Kibana, but somehow I don’t like this solution). So I tried to write common config file for all logs.
As I understand all logs should be rotated by cron container, inside of which there’s logrotate.conf file (and as I can see the logs are rotated according to this file). So I’ve copied this file, modified according to my needs and put it ina /etc/kolla/config with the name cron-logrotate-global.conf (as documentation says). And… nothing. I’ve checked permissions of this file  - everything seems to be ok, so what’s the problem? Below is my logrotate.conf file

Best regards,
Adam Tomas

cat /etc/kolla/config/cron-logrotate-global.conf

daily
rotate 31
copytruncate
compress
delaycompress
notifempty
missingok
minsize 0M
maxsize 100M
su root kolla
"/var/log/kolla/ansible.log"
{
}
"/var/log/kolla/aodh/*.log"
{
}
"/var/log/kolla/barbican/*.log"
{
}
"/var/log/kolla/ceilometer/*.log"
{
}
"/var/log/kolla/chrony/*.log"
{
}
"/var/log/kolla/cinder/*.log"
{
}
"/var/log/kolla/cloudkitty/*.log"
{
}
"/var/log/kolla/designate/*.log"
{
}
"/var/log/kolla/elasticsearch/*.log"
{
}
"/var/log/kolla/fluentd/*.log"
{
}
"/var/log/kolla/glance/*.log"
{
}
"/var/log/kolla/haproxy/haproxy.log"
{
}
"/var/log/kolla/heat/*.log"
{
}
"/var/log/kolla/horizon/*.log"
{
}
"/var/log/kolla/influxdb/*.log"
{
}
"/var/log/kolla/iscsi/iscsi.log"
{
}
"/var/log/kolla/kafka/*.log"
{
}
"/var/log/kolla/keepalived/keepalived.log"
{
}
"/var/log/kolla/keystone/*.log"
{
}
"/var/log/kolla/kibana/*.log"
{
}
"/var/log/kolla/magnum/*.log"
{
}
"/var/log/kolla/mariadb/*.log"
{
}
"/var/log/kolla/masakari/*.log"
{
}
"/var/log/kolla/monasca/*.log"
{
}
"/var/log/kolla/neutron/*.log"
{
    postrotate
        chmod 644 /var/log/kolla/neutron/*.log
    endscript
}
"/var/log/kolla/nova/*.log"
{
}
"/var/log/kolla/octavia/*.log"
{
}
"/var/log/kolla/rabbitmq/*.log"
{
}
"/var/log/kolla/rally/*.log"
{
}
"/var/log/kolla/skydive/*.log"
{
}
"/var/log/kolla/storm/*.log"
{
}
"/var/log/kolla/swift/*.log"
{
}
"/var/log/kolla/vitrage/*.log"
{
}
"/var/log/kolla/zookeeper/*.log"
{
}


More information about the openstack-discuss mailing list