Bug 487434

Summary: A sosplugin to gather the details on logrotate such as its status, its debug information and the configuration files.
Product: Red Hat Enterprise Linux 5 Reporter: Vimal Kumar <vikumar>
Component: sosAssignee: Adam Stokes <astokes>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: agk, azelinka, bmr
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 07:31:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logrotate.py none

Description Vimal Kumar 2009-02-25 23:05:44 UTC
Created attachment 333255 [details]
logrotate.py

Steps to Reproduce:
-----------------------

a) Create a new file named 'logrotate.py' in the sos plugins directory '/usr/lib/python2.4/site-packages/sos/plugins/'.

b) Add the following content in the file 'logrotate.py' :

<snip>
import sos.plugintools

class logrotate(sos.plugintools.PluginBase):
    """logrotate configuration files and debug info
    """
    
    def setup(self):
        self.collectExtOutput("/usr/sbin/logrotate --debug /etc/logrotate.conf",\
                              suggest_filename = "logrotate_debug")
        self.collectExtOutput("/bin/cat /var/lib/logrotate.status",\
                              suggest_filename = "logrotate_status")
        self.addCopySpec("/etc/logrotate*")
        return
</snip>

c) The above steps will create the sos plugin named 'logrotate'. This plugin can be run individually using the command 'sosreport --only-plugins=logrotate'. 

d) The collected details are :

 (i) The output of logrotate run in debug mode, this will not actually execute logrotate but will parse the configurations and will output a test run. Useful to detect what the application is going to do in the actual run. This is saved as 'logrotate_debug' under 'sos_commands/logrotate'.

 (ii) The current status of logrotate saved under sos_commands/logrotate under with the name 'logrotate_status'

 (iii) The configuration files of logrotate under /etc/

Comment 6 errata-xmlrpc 2009-09-02 07:31:48 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1418.html