Bug 2139012

Summary: No /var/lib/pcp/pmdas/snmp/snmp.conf file
Product: Red Hat Enterprise Linux 8 Reporter: Masatake YAMATO <yamato>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Jan Kurik <jkurik>
Severity: unspecified Docs Contact: Jacob Taylor Valdez <jvaldez>
Priority: unspecified    
Version: 8.6CC: agerstmayr, jkurik, nathans, scox
Target Milestone: rcKeywords: Bugfix, Triaged
Target Release: 8.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcp-5.3.7-16.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-16 08:13:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Masatake YAMATO 2022-11-01 01:34:40 UTC
Description of problem:

This is a bug about pcp-pmda-snmp-5.3.5-8.el8.x86_64.

When running the Install script shipped as part of the package, I got the following message: opening /var/lib/pcp/pmdas/snmp/snmp.conf No such file or directory at /var/lib/pcp/pmdas/snmp/pmdasnmp.pl line 90.

The package-specific configuration (/etc/pcp/snmp/snmp.conf) has no effect.
  
Version-Release number of selected component (if applicable):

pcp-pmda-snmp-5.3.5-8.el8.x86_64.

How reproducible:

Steps to Reproduce:
1. dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
2. dnf -y --disablerepo='*'         --enablerepo=rhel-8-for-x86_64-appstream-rpms    --enablerepo=rhel-8-for-x86_64-baseos-rpms  --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms --enablerepo=epel install perl-Net-SNMP pcp-pmda-snmp
3. cd /var/lib/pcp/pmdas/snmp/ && ./Install

Actual results:

opening /var/lib/pcp/pmdas/snmp/snmp.conf No such file or directory at /var/lib/pcp/pmdas/snmp/pmdasnmp.pl line 90.
opening /var/lib/pcp/pmdas/snmp/snmp.conf No such file or directory at /var/lib/pcp/pmdas/snmp/pmdasnmp.pl line 90.
Updating the Performance Metrics Name Space (PMNS) ...
Terminate PMDA if already installed ...
Updating the PMCD control file, and notifying PMCD ...
Check snmp metrics have appeared ... 1 metrics and 1 values

Expected results:

"opening /var/lib/pcp/pmdas/snmp/snmp.conf No such file or directory at /var/lib/pcp/pmdas/snmp/pmdasnmp.pl line 90." should not be printed.

Additional info:

Copying the configuration file (or making a symlink) from /etc/pcp/snmp/snmp.conf to /var/lib/pcp/pmdas/snmp/snmp.conf is an effective workaround.

I inspected the issue and I found that https://github.com/performancecopilot/pcp/pull/1694 may fix this bug partially.

Comment 1 Nathan Scott 2022-11-01 08:10:56 UTC
Hi Masatake-san,

Thanks for the bug report (and upstream fix).  As there's a relatively straightforward
workaround in terms of creating the configuration file in the /var location mentioned,
this is unlikely to meet the requirements for fixing in RHEL 8 at this stage (critical
fixes only with no workaround).  However, we can certainly proceed with including this
in the next scheduled PCP update in RHEL 9 - does that meet your needs here?  If there
is an pressing customer need for this in RHEL 8 though, happy to discuss further.

Comment 6 errata-xmlrpc 2023-05-16 08:13:26 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 (pcp bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2023:2745