pcp
[Top] [All Lists]

pmda persistent indom cache access issues, part 2

To: pcp developers <pcp@xxxxxxxxxxx>
Subject: pmda persistent indom cache access issues, part 2
From: Marko Myllynen <myllynen@xxxxxxxxxx>
Date: Thu, 25 Feb 2016 12:20:49 +0200
Delivered-to: pcp@xxxxxxxxxxx
Organization: Red Hat
Reply-to: Marko Myllynen <myllynen@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
Hi,

On RHEL 7 / PCP 3.10.6 I'm hitting the same issue Ken reported
in http://oss.sgi.com/archives/pcp/2013-05/msg00005.html.

Below is a compact reproducer:

use strict;
use warnings;
use PCP::PMDA;

our $pmda;

sub test_fetch {
        my %timeslices = ('sec' => 42, 'min' => \&min_func, 'hour' => '0');
        $pmda->replace_indom(0, \%timeslices);
}

sub test_fetch_callback {
        return (PM_ERR_AGAIN, 0);
}

$pmda = PCP::PMDA->new('test', 496);

$pmda->add_metric(pmda_pmid(0, 0), PM_TYPE_32, 0,
                PM_SEM_INSTANT, pmda_units(0,0,0,0,0,0),
                'test.test', '', '');

$pmda->add_indom(0, {}, '', '');

$pmda->set_fetch(\&test_fetch);
$pmda->set_fetch_callback(\&test_fetch_callback);
$pmda->set_user('nobody');
$pmda->run();

And this is what the log says after installing the PMDA:

pmda cache persistance failed: Permission denied at 
/var/lib/pcp/pmdas/test/pmdatest.pl line 9.

Should PMDAs running as non-root/non-pcp work? Is this is
RHEL 7 packaging issue or a general problem with PMDAs?

Thanks,

-- 
Marko Myllynen

<Prev in Thread] Current Thread [Next in Thread>