pcp
[Top] [All Lists]

Re: [pcp] pmda persistent indom cache access issues, part 2

To: Marko Myllynen <myllynen@xxxxxxxxxx>, pcp developers <pcp@xxxxxxxxxxx>
Subject: Re: [pcp] pmda persistent indom cache access issues, part 2
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Fri, 26 Feb 2016 06:39:18 +1100
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <56CED581.8020305@xxxxxxxxxx>
References: <56CED581.8020305@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
On 25/02/16 21:20, Marko Myllynen wrote:
> 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.

This is how we install the indom cache directory ...

$(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_VAR_DIR)/config/pmda

so unless the PMDA is running as root or pcp, it is not going to be able to 
_create_ the indom files.

For real PMDAs that need to run as some other uid, there only real option is to 
create the indom files
and chown/chmod them in the Install script (that does run as root).

If this is not possible, then the only options I can think of (assuming mode 
777 and mode 1777 directories in /var are unpalatable) would be a libpcp_pmda 
extension to use (a new) $PCP_PMDA_CACHE_DIR variable from the environment or 
possibly a new method in libpcp_pmda to change the indom cache directory (for 
just the caller PMDA), e.g. pmdaCacheInit(char *dir)

Either would be trivial if the use case is compelling ... the environment 
variable would not require any library ABI or wrapper code changes.

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