Logstash logs are not rotated in Logstash 2.4

Bug #1886787 reported by Doug Szumski
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kolla-ansible
Triaged
Medium
Unassigned
Rocky
Fix Released
Medium
Bartosz Bezak
Stein
Fix Released
Medium
Bartosz Bezak
Train
Fix Released
Medium
Bartosz Bezak

Bug Description

The Logstash 2.4 container has baked in config to rotate the Logstash logs:

(monasca-log-transformer)[logstash@sv-b16-u22 /var/log/kolla/logstash]$ cat /etc/logrotate.d/logstash
/var/log/logstash/*.log /var/log/logstash/*.err /var/log/logstash/*.stdout {
        daily
        rotate 7
        copytruncate
        compress
        delaycompress
        missingok
        notifempty
}

But since the log folder has been set to /var/log/kolla/logstash/ they are not rotated. This means that the logs can grow unbounded, potentially bringing down the host. Eg.

(monasca-log-transformer)[logstash@sv-1222 /var/log/kolla/logstash]$ ls -lah
total 412G
drwxr-sr-x 2 logstash kolla 4.0K Jun 21 2019 .
drwxrwsr-x 12 td-agent kolla 4.0K Oct 31 2019 ..
-rw-r--r-- 1 logstash kolla 94K Jun 22 12:30 monasca-log-metrics.log
-rw-r--r-- 1 logstash kolla 521K Jun 22 12:30 monasca-log-persister.log
-rw-r--r-- 1 logstash kolla 412G Jul 8 09:50 monasca-log-transformer.log

Doug Szumski (dszumski)
Changed in kolla-ansible:
milestone: none → 8.1.2
milestone: 8.1.2 → 9.1.1
milestone: 9.1.1 → none
Mark Goddard (mgoddard)
Changed in kolla-ansible:
importance: Undecided → Medium
status: New → Invalid
Mark Goddard (mgoddard)
Changed in kolla-ansible:
status: Invalid → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/740946

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/train)

Reviewed: https://review.opendev.org/740946
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=0e353d3f57c6f2cb45d993da8737b6e112dd1d45
Submitter: Zuul
Branch: stable/train

commit 0e353d3f57c6f2cb45d993da8737b6e112dd1d45
Author: Bartosz Bezak <email address hidden>
Date: Tue Jul 14 11:55:31 2020 +0000

    Fix Logstash 2.4 log rotation

    Logstash 2.4 uses integrated in container logrotate configuration
    which tries to rotate logs in /var/log/logstash and Kolla's Logstash
    logs are in /var/log/kolla/logstash/
    This patch adds kolla-ansible internal logrotate config for Logstash

    Change-Id: Ifbab7b673ba87925e52bb01c0996479eb1b76c44
    Closes-Bug: #1886787

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/741235

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/741250

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/rocky)

Reviewed: https://review.opendev.org/741235
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=1aeed4343b7af37b7cdf932a0055e337227e1d8f
Submitter: Zuul
Branch: stable/rocky

commit 1aeed4343b7af37b7cdf932a0055e337227e1d8f
Author: Bartosz Bezak <email address hidden>
Date: Tue Jul 14 11:55:31 2020 +0000

    Fix Logstash 2.4 log rotation

    Logstash 2.4 uses integrated in container logrotate configuration
    which tries to rotate logs in /var/log/logstash and Kolla's Logstash
    logs are in /var/log/kolla/logstash/
    This patch adds kolla-ansible internal logrotate config for Logstash

    Change-Id: Ifbab7b673ba87925e52bb01c0996479eb1b76c44
    Closes-Bug: #1886787
    (cherry picked from commit 0e353d3f57c6f2cb45d993da8737b6e112dd1d45)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/stein)

Reviewed: https://review.opendev.org/741250
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=da1267e609f2724d94ef0a494a78a5591eb84d81
Submitter: Zuul
Branch: stable/stein

commit da1267e609f2724d94ef0a494a78a5591eb84d81
Author: Bartosz Bezak <email address hidden>
Date: Tue Jul 14 11:55:31 2020 +0000

    Fix Logstash 2.4 log rotation

    Logstash 2.4 uses integrated in container logrotate configuration
    which tries to rotate logs in /var/log/logstash and Kolla's Logstash
    logs are in /var/log/kolla/logstash/
    This patch adds kolla-ansible internal logrotate config for Logstash

    Change-Id: Ifbab7b673ba87925e52bb01c0996479eb1b76c44
    Closes-Bug: #1886787
    (cherry picked from commit 0e353d3f57c6f2cb45d993da8737b6e112dd1d45)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 8.3.0

This issue was fixed in the openstack/kolla-ansible 8.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 9.3.0

This issue was fixed in the openstack/kolla-ansible 9.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible rocky-eol

This issue was fixed in the openstack/kolla-ansible rocky-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.