Bug 1570039 - Containerized Cinder logs are not compressed when rotated
Summary: Containerized Cinder logs are not compressed when rotated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: puppet-tripleo
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z2
: 13.0 (Queens)
Assignee: Bogdan Dobrelya
QA Contact: Artem Hrechanychenko
URL:
Whiteboard:
Depends On:
Blocks: 1627726
TreeView+ depends on / blocked
 
Reported: 2018-04-20 13:35 UTC by Eric Harney
Modified: 2018-12-24 11:40 UTC (History)
16 users (show)

Fixed In Version: puppet-tripleo-8.3.4-2.el7ost
Doc Type: Release Note
Doc Text:
The compress option for the containerized logrotate service to compress rotated logs by default has been added. The delaycompress option ensures the first rotation of a log file remains uncompressed.
Clone Of:
: 1627726 (view as bug list)
Environment:
Last Closed: 2018-08-29 16:35:54 UTC
Target Upstream Version:
bdobreli: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 566358 0 'None' MERGED Add logrotate compress option 2021-01-13 08:41:16 UTC
OpenStack gerrit 566520 0 'None' MERGED Add logrotate compress option 2021-01-13 08:41:16 UTC
Red Hat Product Errata RHBA-2018:2574 0 None None None 2018-08-29 16:36:50 UTC

Description Eric Harney 2018-04-20 13:35:21 UTC
In non-containerized Cinder, logrotate compresses old log files.

/etc/logrotate.d/openstack-cinder from the Cinder package provides the "compress" option to enable this.

In containerized Cinder, /var/log/containers/cinder/ rotates logs but does not compress old logs.  This can easily result in the disk being filled if debugging is enabled.

This doesn't appear to be Cinder-specific -- no other services logs in /var/log/containers/ are compressed either, despite the same option being present in /etc/logrotate.d/

Comment 1 Paul Grist 2018-05-02 02:21:17 UTC
Any idea if this is a known generic problem?

Comment 2 Alex Schultz 2018-05-02 15:34:23 UTC
Not sure. Logrotate rules are service specific i think

Comment 3 Eric Harney 2018-05-02 15:35:30 UTC
They are.  And they contain the "compress" directive.  It just doesn't seem to work anymore.

Comment 4 Alex Schultz 2018-05-02 15:51:08 UTC
Yup you're right. We have our own tripleo log rotate for containers.

https://github.com/openstack/puppet-tripleo/blob/master/templates/logrotate/containers_logrotate.conf.erb

Bogdan can you take a look at this?

Comment 15 Artem Hrechanychenko 2018-08-08 09:38:14 UTC
VERIFIED

puppet-tripleo-8.3.4-4.el7ost.noarch

(undercloud) [stack@undercloud-0 ~]$ cat core_puddle_version 
2018-08-03.3

[heat-admin@controller-2 ~]$ cat /etc/logrotate.d/openstack-cinder
compress

/var/log/cinder/*.log {
    weekly
    rotate 4
    missingok
    compress
    minsize 100k
    size 10M
    copytruncate
}


[heat-admin@controller-2 ~]$ ls /var/log/containers/cinder/  -l
total 4556
-rw-r--r--. 1 42407 42407 1128210 Aug  8 09:37 cinder-api.log
-rw-r--r--. 1 42407 42407 1917067 Aug  8 09:01 cinder-api.log.1
-rw-r--r--. 1 42407 42407   58766 Aug  8 00:00 cinder-api.log.10.gz
-rw-r--r--. 1 42407 42407   59227 Aug  7 23:01 cinder-api.log.11.gz
-rw-r--r--. 1 42407 42407   59290 Aug  7 22:01 cinder-api.log.12.gz
-rw-r--r--. 1 42407 42407   83245 Aug  7 21:01 cinder-api.log.13.gz
-rw-r--r--. 1 42407 42407   58921 Aug  8 08:00 cinder-api.log.2.gz
-rw-r--r--. 1 42407 42407   59130 Aug  8 07:00 cinder-api.log.3.gz
-rw-r--r--. 1 42407 42407   58318 Aug  8 06:01 cinder-api.log.4.gz
-rw-r--r--. 1 42407 42407   58191 Aug  8 05:00 cinder-api.log.5.gz
-rw-r--r--. 1 42407 42407   60278 Aug  8 04:01 cinder-api.log.6.gz
-rw-r--r--. 1 42407 42407   58454 Aug  8 03:00 cinder-api.log.7.gz
-rw-r--r--. 1 42407 42407   59966 Aug  8 02:00 cinder-api.log.8.gz
-rw-r--r--. 1 42407 42407   59225 Aug  8 01:00 cinder-api.log.9.gz
-rw-r--r--. 1 42407 42407    5750 Aug  8 00:01 cinder-manage.log.1
-rw-r--r--. 1 42407 42407      95 Aug  8 00:01 cinder-rowsflush.log.1
-rw-r--r--. 1 42407 42407    2818 Aug  7 19:42 cinder-scheduler.log.1

Comment 16 Joanne O'Flynn 2018-08-15 08:06:51 UTC
This bug is marked for inclusion in the errata but does not currently contain draft documentation text. To ensure the timely release of this advisory please provide draft documentation text for this bug as soon as possible.

If you do not think this bug requires errata documentation, set the requires_doc_text flag to "-".


To add draft documentation text:

* Select the documentation type from the "Doc Type" drop down field.

* A template will be provided in the "Doc Text" field based on the "Doc Type" value selected. Enter draft text in the "Doc Text" field.

Comment 18 errata-xmlrpc 2018-08-29 16:35:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2574


Note You need to log in before you can comment on or make changes to this bug.