Bug 1185749 - Need to run pmcd at least once before pmval -L will work
Summary: Need to run pmcd at least once before pmval -L will work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pcp
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nathan Scott
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1185740
TreeView+ depends on / blocked
 
Reported: 2015-01-26 08:31 UTC by Marius Vollmer
Modified: 2015-07-30 05:11 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-07-30 05:11:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


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