Bug 1312476 - [BUG] httpd logs not compressed or removed [NEEDINFO]
[BUG] httpd logs not compressed or removed
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: httpd (Show other bugs)
7.0
All Linux
unspecified Severity medium
: pre-dev-freeze
: ---
Assigned To: Luboš Uhliarik
BaseOS QE - Apps
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-26 14:32 EST by Jeff Pullen
Modified: 2017-07-13 10:55 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-13 10:55:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
jorton: needinfo? (jpullen)


Attachments (Terms of Use)

  None (edit)
Description Jeff Pullen 2016-02-26 14:32:50 EST
Description of problem:
A vanilla install of RHEL 6 with RHEV 3.5 will eventually consume all available space in /var/logs because the httpd logs are not compressed or removed.

Version-Release number of selected component (if applicable):
RHEL 6.7 with RHEV 3.5.X

How reproducible:
Install RHEL, and install RHEV. Allow it to run for X number of days/weeks/months and /var/log will be 100%.

Steps to Reproduce:
1. Install RHEL
2. Install RHEV
3. Wait

Actual results:

# cat /etc/logrotate.d/httpd

/var/log/httpd/*log {
    missingok
    notifempty
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}


Expected results:

# cat /etc/logrotate.d/httpd
/var/log/httpd/*log {
    missingok
    notifempty
    sharedscripts
    compress
    rotate 5
    postrotate
        /bin/kill -HUP `cat /var/run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

Additional info:

Rotate 5 worked for me, but it probably doesn't even need to be that much. Default configs only keep the ovirt-engine logs for 20 days and http is set by default to rotate weekly.

If there is some concern that we would be overwritting customer configurations you could make this change only when 'Set application as default page' is set as True during engine-setup.
Comment 1 Yaniv Lavi (Dary) 2016-06-02 04:56:19 EDT
Isn't this a httpd bug? not a RHEV bug?
Comment 2 Yedidyah Bar David 2016-06-02 06:09:12 EDT
(In reply to Yaniv Dary from comment #1)
> Isn't this a httpd bug? not a RHEV bug?

If at all, it's an httpd bug.

The httpd-specific file [1] has neither 'compress' nor 'nocompress'.
The system-wide file [2] has:
# uncomment this if you want your log files compressed
#compress

One might claim it should be enabled by default, which then makes it a logrotate bug.

[1] /etc/logrotate.d/httpd
[2] /etc/logrotate.conf
Comment 3 Joe Orton 2016-06-02 11:25:15 EDT
What's your /etc/logrotate.conf?

[root@virt-el7 ~]# grep ^rotate /etc/logrotate.conf 
rotate 4
[root@virt-el7 ~]# rpm -V logrotate
[root@virt-el7 ~]# rpm -q logrotate
logrotate-3.8.6-7.el7_2.x86_64

httpd does not override the global default of "rotate 4", so it applies to httpd logs.

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