Bug 1579881 - pmlogger daily does not honor PMLOGGER_LOCAL=1
Summary: pmlogger daily does not honor PMLOGGER_LOCAL=1
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcp
Version: 7.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 7.6
Assignee: Nathan Scott
QA Contact: qe-baseos-tools
URL:
Whiteboard:
Depends On: 1565370
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2018-05-18 14:26 UTC by Beat Rubischon
Modified: 2019-05-31 15:53 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-31 15:53:34 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3451012 None None None 2018-05-18 14:32:50 UTC

Description Beat Rubischon 2018-05-18 14:26:50 UTC
Description of problem:

The setting PMLOGGER_LOCAL=1 /etc/sysconfig/pmlogger is respected by the init script, but not by the daily cron job.

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

pcp-3.11.8-7.el7.x86_64

How reproducible:

always

Steps to Reproduce:
1. Install pcp-zerofonf
2. Set PMLOGGER_LOCAL=1 in /etc/sysconfig/pmlogger
3. check for open ports

# ss -tulpen | grep pmlogger
tcp    LISTEN     0      5      127.0.0.1:4330                  *:*                   users:(("pmlogger",pid=6160,fd=7)) uid:997 ino:22879 sk:ffff880079879740 <->
tcp    LISTEN     0      5       ::1:4330                 :::*                   users:(("pmlogger",pid=6160,fd=8)) uid:997 ino:22880 sk:ffff880079871100 v6only:1 <->

4. Run daily rotation, check for open ports

# su pcp -s /bin/bash -c "/usr/libexec/pcp/bin/pmlogger_daily -X xz -x 1"
# ss -tulpen | grep pmlogger
tcp    LISTEN     0      5         *:4330                  *:*                   users:(("pmlogger",pid=6554,fd=7)) uid:997 ino:25333 sk:ffff8800781d87c0 <->
tcp    LISTEN     0      5        :::4330                 :::*                   users:(("pmlogger",pid=6554,fd=8)) uid:997 ino:25334 sk:ffff8800781d1100 v6only:1 <->


Actual results:

tcp    LISTEN     0      5         *:4330                  *:*                   users:(("pmlogger",pid=6554,fd=7)) uid:997 ino:25333 sk:ffff8800781d87c0 <->
tcp    LISTEN     0      5        :::4330                 :::*                   users:(("pmlogger",pid=6554,fd=8)) uid:997 ino:25334 sk:ffff8800781d1100 v6only:1 <->

Expected results:

tcp    LISTEN     0      5      127.0.0.1:4330                  *:*                   users:(("pmlogger",pid=6160,fd=7)) uid:997 ino:22879 sk:ffff880079879740 <->
tcp    LISTEN     0      5       ::1:4330                 :::*                   users:(("pmlogger",pid=6160,fd=8)) uid:997 ino:22880 sk:ffff880079871100 v6only:1 <->

Additional info:

Comment 2 Nathan Scott 2018-05-21 06:43:47 UTC
Fixed upstream ...

commit c91f2f13047bd51ea5cd0d23008b9e526ff30311 (HEAD -> master)
Author: Nathan Scott <nathans@redhat.com>
Date:   Mon May 21 16:41:56 2018 +1000

    pmnewlog: honour any /etc/sysconfig/pmlogger settings
    
    Missed a spot in the PMLOGGER_LOCAL implementation - it
    previously was being honoured by pmlogger_check script,
    but not pmlogger_daily - tweak pmnewlog to resolve this
    and start the primary pmlogger consistently.
    
    Resolves Red Hat BZ #1579881.


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