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
|