Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1735928

Summary: Adding comment regarding delaycompress dependency on compress option in /etc/logrotate.d/httpd
Product: Red Hat Enterprise Linux 7 Reporter: Ravindra Patil <ravpatil>
Component: httpdAssignee: Luboš Uhliarik <luhliari>
Status: CLOSED UPSTREAM QA Contact: RHEL Stacks Subsystem QE <rhel-stacks-subsystem-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: jorton, luhliari, mertensb.mazda, npope+rhbugzilla, rhel-stacks-subsystem-qe
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-08 08:35:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ravindra Patil 2019-08-01 13:21:23 UTC
Description of problem:

By default logrotation configuration for httpd uses delaycompress option as follows :

# cat /etc/logrotate.d/httpd 
/var/log/httpd/*log {
    missingok
    notifempty
    sharedscripts
    delaycompress
    postrotate
        /bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true
    endscript
}


Customer is requesting to add comment as follows before delaycompress in /etc/logrotate.d/httpd for better user experience. 

# The delaycompress only has effect when used in  combination  with  compress option in default configuration /etc/logrotate.conf. Without compress in logrotate.conf delaycompress option is harmless and does nothing. 


Version-Release number of selected component (if applicable):
httpd-2.4.6-89.el7_6.x86_64

How reproducible:
- Not clarified if delaycompress would work by default or need any configuration. 

Steps to Reproduce:
1. Install httpd
2. Check if delaycompress is set in httpd logrotation configuration
3. Check if compress option is set in logrotation.conf global configuration.  

Actual results:
- No mention of delaycompress dependency on compress

Expected results:
- Comment should mention that delaycompress is effective only with compress option. 

Additional info:

Comment 2 Joe Orton 2019-10-08 08:35:03 UTC
In the logrotate man page it is mentioned very clearly that delaycompress only has effect
with "compress":

       delaycompress
              Postpone  compression of the previous log file to the next rotation cycle.  This only has effect when used in combination with compress.  It can be

We are not planning to change the config file for current releases of Red Hat Enterprise Linux, but I have added a comment for future major releases:

https://src.fedoraproject.org/rpms/httpd/c/c99e83a2d8d3fb9808b1048f5f7d0550882f4521?branch=master

Comment 3 Joe Orton 2019-10-08 08:48:39 UTC
I've also added a section to the httpd.service(8) man page about this.

https://src.fedoraproject.org/rpms/httpd/c/c55d94fac79223ab9b003cd757ef8000a70a9d72?branch=master

Comment 4 Joe Orton 2021-01-07 11:01:05 UTC
*** Bug 1913375 has been marked as a duplicate of this bug. ***

Comment 5 mertensb.mazda 2021-01-08 12:04:11 UTC
I understand that the "compress" option will not be added because doing so would change behaviour of existring installations.

However I would propose to remove the "delaycompress" option.

It is not functional without the compress option and the current configuration is confusing.

Thanks in advance.

Comment 6 Joe Orton 2021-01-08 14:06:01 UTC
The problem is that if "compress" is used *without* delaycompress for httpd, that will end up with correct/broken/dropped logs.  Hence, delaycompress is used to get correct behaviour if "compress" is configured globally.