Bug 1013898

Summary: Fix various issues with logconv.pl
Product: Red Hat Enterprise Linux 7 Reporter: Nathan Kinder <nkinder>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Sankar Ramalingam <sramling>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jgalipea, mreynolds, nhosoi, nkinder, rmeggins
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.1.6-18.el7 Doc Type: Bug Fix
Doc Text:
Cause: Perl coding errors Consequence: warnings and errors are generated when using "use Strict;" Fix: Correct the various warnings and errors. Result: logconv.pl runs with giving any warning or error messages.
Story Points: ---
Clone Of: 1013164 Environment:
Last Closed: 2014-06-13 13:29:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1013164    
Bug Blocks:    

Description Nathan Kinder 2013-10-01 02:23:03 UTC
+++ This bug was initially created as a clone of Bug #1013164 +++

This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47520

Use of uninitialized value in string eq at /usr/bin/logconv.pl line 703.
Use of uninitialized value in subroutine entry at /usr/bin/logconv.pl line 2192, <LOG> line 2328.
...
...

Internal connections/operations are not correctly recorded.

DB_File arrays do not like "0" as values.

Comment 2 Sankar Ramalingam 2014-01-30 09:45:14 UTC
I am still getting "Use of uninitialized" error. Hence, marking the bug as Assigned.

Build tested - 389-ds-base-1.3.1.6-15


logconv.pl -m -M /var/log/dirsrv/slapd-testinst/access

Access Log Analyzer 8.0

Command: logconv.pl /var/log/dirsrv/slapd-testinst/access

Processing 1 Access Log(s)...

[00] /var/log/dirsrv/slapd-testinst/access	size (bytes):            0
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/logconv.pl line 1595.
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/logconv.pl line 1600.
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/logconv.pl line 1606.
Use of uninitialized value $_ in split at /usr/bin/logconv.pl line 1623.
Use of uninitialized value $time in substitution (s///) at /usr/bin/logconv.pl line 1627.
Use of uninitialized value $tzone in substitution (s///) at /usr/bin/logconv.pl line 1628.
Use of uninitialized value $tzone in pattern match (m//) at /usr/bin/logconv.pl line 1634.
Use of uninitialized value $hr in multiplication (*) at /usr/bin/logconv.pl line 1635.
Use of uninitialized value $min in multiplication (*) at /usr/bin/logconv.pl line 1635.
Use of uninitialized value $sign in string eq at /usr/bin/logconv.pl line 1636.
Use of uninitialized value $time in split at /usr/bin/logconv.pl line 1640.
Use of uninitialized value $date in split at /usr/bin/logconv.pl line 1641.
Use of uninitialized value $mon in hash element at /usr/bin/logconv.pl line 1642.
Use of uninitialized value in scalar assignment at /usr/share/perl5/vendor_perl/Carp.pm line 182.
Day '' out of range 1..31 at /usr/bin/logconv.pl line 1642.

Comment 3 Rich Megginson 2014-01-30 15:58:13 UTC
(In reply to Sankar Ramalingam from comment #2)
> I am still getting "Use of uninitialized" error. Hence, marking the bug as
> Assigned.
> 
> Build tested - 389-ds-base-1.3.1.6-15
> 
> 
> logconv.pl -m -M /var/log/dirsrv/slapd-testinst/access

Why -m -M?  Those are not correct arguments.

> 
> Access Log Analyzer 8.0
> 
> Command: logconv.pl /var/log/dirsrv/slapd-testinst/access
> 
> Processing 1 Access Log(s)...
> 
> [00] /var/log/dirsrv/slapd-testinst/access	size (bytes):            0

The access log has a size of 0 bytes.

> Use of uninitialized value $_ in pattern match (m//) at /usr/bin/logconv.pl
> line 1595.
> Use of uninitialized value $_ in pattern match (m//) at /usr/bin/logconv.pl
> line 1600.
> Use of uninitialized value $_ in pattern match (m//) at /usr/bin/logconv.pl
> line 1606.
> Use of uninitialized value $_ in split at /usr/bin/logconv.pl line 1623.
> Use of uninitialized value $time in substitution (s///) at
> /usr/bin/logconv.pl line 1627.
> Use of uninitialized value $tzone in substitution (s///) at
> /usr/bin/logconv.pl line 1628.
> Use of uninitialized value $tzone in pattern match (m//) at
> /usr/bin/logconv.pl line 1634.
> Use of uninitialized value $hr in multiplication (*) at /usr/bin/logconv.pl
> line 1635.
> Use of uninitialized value $min in multiplication (*) at /usr/bin/logconv.pl
> line 1635.
> Use of uninitialized value $sign in string eq at /usr/bin/logconv.pl line
> 1636.
> Use of uninitialized value $time in split at /usr/bin/logconv.pl line 1640.
> Use of uninitialized value $date in split at /usr/bin/logconv.pl line 1641.
> Use of uninitialized value $mon in hash element at /usr/bin/logconv.pl line
> 1642.
> Use of uninitialized value in scalar assignment at
> /usr/share/perl5/vendor_perl/Carp.pm line 182.
> Day '' out of range 1..31 at /usr/bin/logconv.pl line 1642.

Not sure why it is still attempting to scan a 0 length file.

But at any rate, you have found potentially two different bugs, and not verified this one.

1) Using -m -M creates a file called "-M" - but this is in violation of the given usage, and doesn't wipe out the access log, so I'm inclined to not have this filed as a bug
2) Using logconv.pl with an empty access log gives lots of errors

Comment 4 Rich Megginson 2014-02-01 00:30:56 UTC
To ssh://git.app.eng.bos.redhat.com/srv/git/389-ds-base.git
   9b1e2d0..7dc5c28  rhel-7.0 -> rhel-7.0

Comment 5 Rich Megginson 2014-02-01 00:33:02 UTC
(In reply to Rich Megginson from comment #3)
> (In reply to Sankar Ramalingam from comment #2)
> 1) Using -m -M creates a file called "-M" - but this is in violation of the
> given usage, and doesn't wipe out the access log, so I'm inclined to not
> have this filed as a bug

WONTFIX - we don't need to open a bug for this

> 2) Using logconv.pl with an empty access log gives lots of errors

Please open a bug for this

Comment 6 Sankar Ramalingam 2014-02-01 02:23:21 UTC
(In reply to Rich Megginson from comment #5)
> (In reply to Rich Megginson from comment #3)
> > (In reply to Sankar Ramalingam from comment #2)
> > 1) Using -m -M creates a file called "-M" - but this is in violation of the
> > given usage, and doesn't wipe out the access log, so I'm inclined to not
> > have this filed as a bug
> 
> WONTFIX - we don't need to open a bug for this
> 
Sure.
> > 2) Using logconv.pl with an empty access log gives lots of errors
> 
> Please open a bug for this
Opened a bugzilla for this issue - https://bugzilla.redhat.com/show_bug.cgi?id=1060385

Comment 7 Sankar Ramalingam 2014-02-04 20:57:28 UTC
Test1:
logconv.pl -M /tmp/test22 -m log-minute-stats-csv.out /var/log/dirsrv/slapd-sriram3/access
Access Log Analyzer 8.0
Command: logconv.pl /var/log/dirsrv/slapd-sriram3/access
Processing 1 Access Log(s)...

Test2:
logconv.pl -m log-minute-stats-csv.out /var/log/dirsrv/slapd-sriram3/access
Access Log Analyzer 8.0
Command: logconv.pl /var/log/dirsrv/slapd-sriram3/access
Processing 1 Access Log(s)...

Both Test1 and Test2 are successfully executing with the latest builds. Hence, marking the bug as verified.

Build tested - 389-ds-base-1.3.1.6-18

Comment 8 Sankar Ramalingam 2014-02-13 11:53:04 UTC
Test cases automated in ./logfile/logconv.sh

Comment 9 Ludek Smid 2014-06-13 13:29:57 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.