Hi Martins,
----- Original Message -----
> [...]
> I am trying to track down some strangeness I'm seeing in pmlogger
> configuration between 3.10.0 and recent git.
>
> All defaults except the primary logger line:
>
> ####
> LOCALHOSTNAME y n PCP_LOG_DIR/pmlogger/LOCALHOSTNAME -r -c
> primary.logger
> ####
>
> The file:
>
> /etc/pcp/pmlogger/primary.logger
>
> exists and everything works as expected.
>
> On a recent git system, with the same config, pmlogger does not find the
> primary.logger file and seems to construct a new (unrelated) one with
> pmlogconf in /var/lib/pcp/config/pmlogger/primary.logger that appears to
> be some sort of default config on startup.
>
> The change seems to come from here:
>
> 0020568401cefe9df692e2f705b8133a8ab87f0d
Yes, that's the one - its missing an update to the specfile script to
reflect the change it makes (i.e. making /var/lib/pcp/config/pmlogger
the default location for configs once more; for a variety of exciting
reasons - mainly around permissions - we have come full circle).
> I guess I have 2 questions:
>
> 1. The comment led me to believe that everything should still work since
> it says "." is searched first and I would expect "." to map to
> /etc/pcp/pmlogger since that is where the control file lives. Is that
> not correct?
In this context, "." is the current working directory for the pmlogger
process, which is /var/log/pcp/pmlogger/<host> from pmlogger_check(1).
> 2. This was on a clean install with rpms built from git on a Centos 6.5
> machine. I can deal with this on new systems by putting the config in
> the right place, but what is the expected behavior on upgrade? I am
> setting up a test system that I can upgrade shortly, because I got lost
> in the config file logic in the spec file, and am not sure if the right
> thing will happen in terms of moving existing config files to the new
> right place.
After an upgrade we *should* be ending up with the right config to use
below /var/lib/pcp/config/pmlogger (the rpm script didn't reflect this
though the deb script did - fixed now, should be in pcp-3.10.4 soon).
You can avoid this whole situation by using fully qualified paths to
the configuration files - being explicit means we don't drop into the
search algorithm at all - or storing your configs in those individual
(per-control-file-line) pmlogger directories.
cheers.
--
Nathan
|