[ClusterLabs] Opinions wanted: another logfile question for Pacemaker 2.0

Ken Gaillot kgaillot at redhat.com
Mon Jan 15 12:19:27 EST 2018


On Mon, 2018-01-15 at 18:08 +0100, Klaus Wenninger wrote:
> On 01/15/2018 05:51 PM, Ken Gaillot wrote:
> > Currently, Pacemaker will use the same detail log as corosync if
> > one is
> > specified (as "logfile:" in the "logging {...}" section of
> > corosync.conf).
> > 
> > The corosync developers think that is a bad idea, and would like
> > pacemaker 2.0 to always use its own log.
> > 
> > Corosync and pacemaker both use libqb to write to the logfile.
> > libqb
> > doesn't have any locking mechanism, so there could theoretically be
> > some conflicting writes, though we don't see any in practice.
> > 
> > Does anyone have a strong opinion on this one way or the other? Do
> > you
> > like having pacemaker and corosync detail messages in one logfile,
> > or
> > would you prefer separate logfiles?
> 
> I'm aware that a log-entry from one source (like corosync) appearing
> before an entry from another source (like pacemaker) doesn't
> necessarily
> mean that this correctly reflects their sequence in time but usually
> it is working fairly well.
> With timestamps of 1 second granularity in 2 files we would be
> definitely
> off worse.
> Please correct me if timestamping is configurable already but if not
> I would say we should either have at least the possibility to log
> into
> a single file or we should have timestamping with a granularity at
> least 3 magnitudes finer. (configurable timestamps as in pacemaker-
> alerts
> might be a solution)
> 
> Regards,
> Klaus

Configurable timestamps (or even just switching to high-precision
timestamps permanently) sounds great. However that would require
changes in libqb.

You can already get configurable timestamps in the syslog, via the
native syslog functionality. That is more reliable than relying on the
corosync vs pacemaker ordering in the detail log.

Better support in libqb for writing to the same logfile might be
interesting, but it would require both high-precision timestamps and
locking, which could impact performance. I'd prefer high-precision
timestamps in separate files.
-- 
Ken Gaillot <kgaillot at redhat.com>




More information about the Users mailing list