Project

General

Profile

Actions

Bug #4011

closed

The logrotate configuration in RHEL does not rotate httpd logs

Added by Matthieu CERDA over 9 years ago. Updated over 9 years ago.

Status:
Released
Priority:
2
Category:
System techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Regression:

Description

The logrotate configuration in RHEL does not rotate httpd logs, because it uses:
  • A wrong directory (/var/log/rudder/apache2 instead of /var/log/rudder/httpd)
  • A wrong postrotate command (/etc/init.d/apache2 reload instead of /etc/init.d/httpd reload)
/var/log/rudder/apache2/*.log {
        daily
        missingok
        rotate 30
        compress
        notifempty
        create 640 root root
        delaycompress
        sharedscripts
        postrotate
          /etc/init.d/apache2 reload > /dev/null
        endscript
}
To fix the problem, we will have to:
  • Fix the command
  • Fix the directory, but cf. #4010, we will now use /var/log/rudder/apache2 directory for apache logging on all OSes from 2.8 onwards. Therefore, we need to add a second logrotate entry for /var/log/rudder/apache2 as well as /var/log/rudder/httpd.

The result should be:

# Pre-2.8 rotation for Apache
# Before the unification of the apache log directories (http://www.rudder-project.org/redmine/issues/4010)
# we used this directory to store apache logs.
/var/log/rudder/httpd/*.log {
        daily
        missingok
        rotate 30
        compress
        notifempty
        create 640 root root
        delaycompress
        sharedscripts
        postrotate
          /etc/init.d/httpd reload > /dev/null
        endscript
}

/var/log/rudder/apache2/*.log {
        daily
        missingok
        rotate 30
        compress
        notifempty
        create 640 root root
        delaycompress
        sharedscripts
        postrotate
          /etc/init.d/httpd reload > /dev/null
        endscript
}

Actions #1

Updated by Matthieu CERDA over 9 years ago

  • Status changed from New to In progress

We should also use the right logrotate configuration in the initial promises...

Actions #2

Updated by Matthieu CERDA over 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/203

PR available.

Actions #3

Updated by Jonathan CLARKE over 9 years ago

I must note that because of #4012, this file was never used, therefore this bug never affected any systems.

Actions #4

Updated by Jonathan CLARKE over 9 years ago

  • Project changed from 34 to Rudder
  • Category set to System techniques
Actions #5

Updated by Jonathan CLARKE over 9 years ago

  • Status changed from Pending technical review to Pending release
Actions #6

Updated by Nicolas PERRON over 9 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.4.11, which was released today.
Check out:

Actions

Also available in: Atom PDF