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.
|