Bug 1185749

Summary: Need to run pmcd at least once before pmval -L will work
Product: [Fedora] Fedora Reporter: Marius Vollmer <mvollmer>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: brolley, fche, lberk, mgoodwin, nathans, pcp, scox
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-30 05:11:18 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:
Bug Depends On:    
Bug Blocks: 1185740    

Description Marius Vollmer 2015-01-26 08:31:16 UTC
Description of problem:

Using a local context as with 'pmval -L' will fail if pmcd has never been started before.

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


How reproducible:

Always

Steps to Reproduce:
1. Make sure that pcp is not installed
   # yum remove pcp
   # rm -rf /var/lib/pcp/
2. Install pcp
   # yum install pcp
3. Run pmval with a local context
   # pmval -L kernel.all.user.cpu

Actual results:

    # pmval -L kernel.all.cpu.user

    Error Parsing ASCII PMNS: Cannot open "/var/lib/pcp/pmns/root"
    pmval: pmLookupName(kernel.all.cpu.user): PMNS not accessible

Expected results:

No error from pmval.

Additional info:

Starting/stopping pmcd will create the missing file.

Comment 1 Marius Vollmer 2015-01-29 07:55:56 UTC
Maybe this is as simple as adding "cd /var/lib/pcp/pmns && ./Rebuild -du" to %post.

Comment 2 Nathan Scott 2015-07-30 05:11:18 UTC
This snuck in under the radar last release, via...

commit ca4e4003e2f388ae36e65629059c1a750e3f5e3d
Author: Mark Goodwin <mgoodwin>
Date:   Mon Jun 15 18:35:50 2015 +1000

    Port fix to build the pmns during pcp setup from pcp.spec.in to fedora.spec.
    
    This ports lberk's fix (6fede86a8) for BZ 185749 in pcp.spec.in to
    fedora.spec, including kenj's follow-up fix to rm -f .NeedRebuild