Bug 1967174

Summary: pmproxy port value is ignored
Product: Red Hat Enterprise Linux 8 Reporter: Anthony Zone <azone>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Jan Kurik <jkurik>
Severity: low Docs Contact: Apurva Bhide <abhide>
Priority: unspecified    
Version: 8.4CC: agerstmayr, jkurik, mgoodwin, nathans, patrickm
Target Milestone: betaKeywords: Bugfix, Triaged
Target Release: 8.5Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: pcp-5.3.1-1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 17:50:37 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 Anthony Zone 2021-06-02 14:39:03 UTC
Description of problem:
Setting the PMPROXY_PORT variable in pmproxy.options doesn't actually change the port for pmproxy.

Also when attempting to set this in the systemd unit file with -p it is also ignored if it's at the end of the command.  

I even attempted to uncomment all the lines in pmproxy.options and I didn't see any kind of change in when pmproxy was started.

However, setting PMPROXY_PORT in /etc/sysconfig/pmproxy does reflect the change.

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

Tested with latest version in RHEL 8: pcp-5.2.5-4.el8.x86_64

How reproducible:
Every time.


Steps to Reproduce:
1. Add PMPROXY_PORT=50000
2. Start pmproxy
3. Notice it grabs the default port.

Actual results:

Variable is ignored and pmproxy starts with port 44322 and port 44323

Expected results:

pmproxy honors the variable in pmproxy.options and starts at the value that is set.

Additional info:

Doing a strace shows that pmproxy does read in this file.  SO we'd expect that this setting be honored, but again I uncommented everything in pmproxy.options and I didn't see any kind of change in how pmproxy was starting up.  So I'm guessing something is overwriting these settings. 

If my assessment is incorrect and this should only be set in the /etc/sysconfig/pmproxy, then the man page needs to be updated to clearly indicate where this should be set as this is VERY confusing, not only for customers, but for support as well that couldn't figure out how to get this set.

Comment 1 Nathan Scott 2021-06-02 22:43:44 UTC
Thanks Anthony - you're spot on, environment variables are only set
from the sysconfig files in modern PCP.  This config file snippet -
and similar in pmcd.options - is a leftover from (many) years ago.

I'll get it fixed up and see if I can improve the docs - thanks for
reporting it.

cheers.

Comment 2 Nathan Scott 2021-06-02 23:06:34 UTC
Resolved upstream via the following commit, will be in pcp-5.3.1

commit aafd6ddb69bc08f70277431b0bbc724c96729be5
Author: Nathan Scott <nathans>
Date:   Thu Jun 3 09:03:34 2021 +1000

    docs: drop commented env vars from command line option configs
    
    The pmcd and pmproxy options files have not supported setting
    environment variables via their .options file for many years.
    These files are for command line options only and the scripts
    enforce that, dropping all lines that do not start with minus
    character.
    
    Environment variables are only set via the sysconfig files -
    make some improvements to the documentation so this is clear.
    
    Resolves Red Hat BZ #1967174

Comment 10 errata-xmlrpc 2021-11-09 17:50:37 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-2021:4171