Bug 1013135 - logconv.pl tool removes the access logs contents if "-M" is not correctly used
Summary: logconv.pl tool removes the access logs contents if "-M" is not correctly used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Sankar Ramalingam
URL:
Whiteboard:
Depends On:
Blocks: 1061410
TreeView+ depends on / blocked
 
Reported: 2013-09-27 21:52 UTC by Rich Megginson
Modified: 2020-09-13 20:18 UTC (History)
4 users (show)

Fixed In Version: 389-ds-base-1.2.11.15-34.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 07:50:58 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 471 0 None None None 2020-09-13 20:18:02 UTC
Red Hat Product Errata RHBA-2014:1385 0 normal SHIPPED_LIVE 389-ds-base bug fix and enhancement update 2014-10-14 01:27:42 UTC

Description Rich Megginson 2013-09-27 21:52:03 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/471

https://bugzilla.redhat.com/show_bug.cgi?id=838656 (''Red Hat Enterprise Linux 7'')

{{{
Description of problem:
     Running logconv.pl tool with -m or -M option without specifying the
stats.out file, leads to removal of the access logs file contents. This option
is recently introduced to generate Minute/Second based statitics for the ldap
operations.

Version-Release number of selected component (if applicable):
389-ds-base-1.2.10.2-20

How reproducible: Consistently

Steps to Reproduce:
1. Install 389-ds-base latest packages on rhel6.
2. Run logconv.pl tool with -M option.
First, run "ls -l /var/log/dirsrv/slapd-inst/access" to check the size of the
file.
/usr/bin/logconv.pl -M /var/log/dirsrv/slapd-inst/access > /tmp/logconv.out

It generates output as - Illegal division by zero at /usr/bin/logconv.pl line
517

Also, it removes the contents of access logs. Check the file size now.

Actual results: Improper usages of command leads to removal of file contents.

Expected results: Improper usage should give an error message and it should
print the help.

Additional info: Correct usage of the command.
logcov.pl -M /tmp/min_stats.out /var/log/dirsrv/slapd-inst/access
}}}

USCBP would like this in rhel 6.5

Comment 3 srkrishn@redhat.com 2014-07-18 07:46:55 UTC
this bug has been verified as shown below:
following the instructions by Rich Megginson, we can see that the access log file is not empty


[root@hp-ms-01-c04 slapd-hp-ms-01-c04]# ls -l /var/log/dirsrv/slapd-hp-ms-01-c04/access.20140717-022403 
-rw-------. 1 nobody nobody 282013304 Jul 18 01:51 /var/log/dirsrv/slapd-hp-ms-01-c04/access.20140717-022403
[root@hp-ms-01-c04 slapd-hp-ms-01-c04]# logconv.pl -M /var/log/dirsrv/slapd-inst/access > /tmp/logconv.out
[root@hp-ms-01-c04 slapd-hp-ms-01-c04]# cat /tmp/logconv.out 
Usage error for option -m or -M, either the output file or access log is missing!

Cleaning up temp files...
Done.
[root@hp-ms-01-c04 slapd-hp-ms-01-c04]#  ls -l /var/log/dirsrv/slapd-hp-ms-01-c04/access.20140717-022403 
-rw-------. 1 nobody nobody 282013304 Jul 18 01:51 /var/log/dirsrv/slapd-hp-ms-01-c04/access.20140717-022403
[root@hp-ms-01-c04 slapd-hp-ms-01-c04]# 

this was tested on build:1.2.11.15.38-389-ds-base

Comment 4 Sankar Ramalingam 2014-07-23 16:25:16 UTC
Marking the bug as Verified as per previous comment

Comment 5 errata-xmlrpc 2014-10-14 07:50:58 UTC
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.

http://rhn.redhat.com/errata/RHBA-2014-1385.html


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