Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1570039 - Containerized Cinder logs are not compressed when rotated
Containerized Cinder logs are not compressed when rotated
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: puppet-tripleo (Show other bugs)
13.0 (Queens)
Unspecified Unspecified
high Severity high
: z2
: 13.0 (Queens)
Assigned To: Bogdan Dobrelya
Artem Hrechanychenko
: Rebase, Triaged, ZStream
Depends On:
Blocks: 1627726
  Show dependency treegraph
 
Reported: 2018-04-20 09:35 EDT by Eric Harney
Modified: 2018-09-11 06:54 EDT (History)
16 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 1627726 (view as bug list)
Environment:
Last Closed: 2018-08-29 12:35:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
bdobreli: needinfo-


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 566358 None master: MERGED puppet-tripleo: Add logrotate compress option (Id07b7b53d31192a2d2172671b272a5b61dc8df52) 2018-07-18 21:41 EDT
OpenStack gerrit 566520 None stable/queens: MERGED puppet-tripleo: Add logrotate compress option (Id07b7b53d31192a2d2172671b272a5b61dc8df52) 2018-07-18 21:41 EDT
Red Hat Product Errata RHBA-2018:2574 None None None 2018-08-29 12:36 EDT

  None (edit)
Description Eric Harney 2018-04-20 09:35:21 EDT
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-01 22:21:17 EDT
Any idea if this is a known generic problem?
Comment 2 Alex Schultz 2018-05-02 11:34:23 EDT
Not sure. Logrotate rules are service specific i think
Comment 3 Eric Harney 2018-05-02 11:35:30 EDT
They are.  And they contain the "compress" directive.  It just doesn't seem to work anymore.
Comment 4 Alex Schultz 2018-05-02 11:51:08 EDT
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 05:38:14 EDT
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 04:06:51 EDT
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 12:35:54 EDT
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.