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 1252308 - Issues in postfix pmda's search for mail log
Summary: Issues in postfix pmda's search for mail log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcp
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Nathan Scott
QA Contact: Miloš Prchlík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-11 07:09 UTC by Miloš Prchlík
Modified: 2016-11-04 04:22 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 04:22:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2344 0 normal SHIPPED_LIVE pcp bug fix and enhancement update 2016-11-03 13:46:51 UTC

Description Miloš Prchlík 2015-08-11 07:09:30 UTC
Description of problem:


The first issue that caught my attention, and caused my sanity test of postfix pmda to fail: test failed to install pmda, with these errors in pmcd/postfix.log:

[Tue Aug 11 02:53:58] pmdapostfix(27796) Info: qshape cmd: qshape -b 10 -t 5 <qname>
[Tue Aug 11 02:53:58] pmdapostfix(27796) Error: Data read error on tailed file: Is a directory

Which makes sense, after some digging it was obvious that /var/log/mail - present in @logfiles - is a directory. /var/log/mail is a directory, but readable, therefore it's used in qshape calls.


The second issue, pmdapostfix.pl, line 243 - I'm no friend with perl but I think there should be $pmda:

  pmda->log("Fatal: No Postfix log file found in: @logfiles");


Version-Release number of selected component (if applicable):

pcp-pmda-postfix-3.10.6-1.el7


How reproducible:

Always, on all arches


Steps to Reproduce:
1. service pmcd start
2. cd /var/lib/pcp/pmdas/postfix && ./Install
3.

Actual results:


Expected results:


Additional info:

Comment 1 Miloš Prchlík 2015-08-11 07:14:04 UTC
I made a tiny mistake, the correct messages in pmcd/postfix.log are:

[Fri Aug  7 05:24:14] pmdapostfix(64056) Info: qshape cmd: qshape -b 10 -t 5 <qname>
[Fri Aug  7 05:24:14] pmdapostfix(64056) Info: logfile: /var/log/mail
[Fri Aug  7 05:24:14] pmdapostfix(64056) Error: Data read error on tailed file: Is a directory

Comment 2 Nathan Scott 2015-08-13 07:37:39 UTC
(In reply to Miloš Prchlík from comment #0)
> [...]
> Which makes sense, after some digging it was obvious that /var/log/mail -
> present in @logfiles - is a directory. /var/log/mail is a directory, but
> readable, therefore it's used in qshape calls.
> 

Yep - easily defended against, fix headed upstream shortly.

> 
> The second issue, pmdapostfix.pl, line 243 - I'm no friend with perl but I
> think there should be $pmda:
> 
>   pmda->log("Fatal: No Postfix log file found in: @logfiles");
> 

Yes, good catch; perl is lenient on that, but also fixed upstream now.

I wouldn't think these issues are high enough priority for a rebuild at this stage, but we can pick them up in the context of other patches if any are needed.

thanks Miloš!

Comment 5 Miloš Prchlík 2016-08-20 11:11:40 UTC
Verified for build pcp-3.11.3-3.el7.

Comment 7 errata-xmlrpc 2016-11-04 04:22:27 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.

https://rhn.redhat.com/errata/RHBA-2016-2344.html


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