[ClusterLabs] Resource-agents log is not output to /var/log/pacemaker/pacemaker.log on RHEL8

Ken Gaillot kgaillot at redhat.com
Thu May 30 14:31:39 EDT 2019


On Wed, 2019-05-29 at 09:23 -0500, Ken Gaillot wrote:
> On Wed, 2019-05-29 at 16:53 +0900, 飯田雄介 wrote:
> > Hi Ken and Jan,
> > 
> > Thank you for your comment.
> > 
> > I understand that solusion is to set PCMK_logfile in the sysconfig
> > file.
> > 
> > As a permanent fix, if you use the default values inside Pacemaker,
> > how about setting environment variables using set_daemon_option()
> > there?
> 
> That would be better. I was just going to change the shipped
> sysconfig
> because it's easy to do immediately, but changing the code would
> handle
> cases where users auto-generate a sysconfig that doesn't include it,
> launch pacemaker manually for testing, etc. However that'll have to
> wait for the next release.

Hi,

Since this is a regression in 2.0.0, and the change was small, I
decided to include it in 2.0.2-rc3 after all. Thanks for investigating
and reporting the issue!

> > For example, as PCMK_logficility does.
> > 
> 
> 
https://github.com/ClusterLabs/pacemaker/blob/Pacemaker-2.0.2-rc2/lib/common/logging.c#L806
> > 
> > BTW, Pacemaker writes to /var/log/pacemaker/pacemaker.log via
> > libqb.
> > RA writes to this file with echo redirect.
> > If writing occurs at the same time, is there a risk that the file
> > may
> > be corrupted or the written log may disappear?
> > I have never actually had a problem, but I'm interested in how this
> > might happen.
> > 
> > Regards,
> > Yusuke
> > 
> > 2019年5月28日(火) 23:56 Jan Pokorný <jpokorny at redhat.com>:
> > > On 28/05/19 09:29 -0500, Ken Gaillot wrote:
> > > > On Mon, 2019-05-27 at 14:12 +0900, 飯田雄介 wrote:
> > > > > By the way, when /var/log/pacemaker/pacemaker.log is
> > > > > explicitly
> > > 
> > > set
> > > > > in the PCMK_logfile, it is confirmed that the resource-agents
> > > 
> > > log is
> > > > > output to the file set in the PCMK_logfile.
> > > > 
> > > > Interesting ... the resource-agents library must look for
> > > 
> > > PCMK_logfile
> > > > as well as HA_logfile. In that case, the easiest solution will
> > > > be
> > > 
> > > for
> > > > us to set PCMK_logfile explicitly in the shipped sysconfig
> > > > file.
> > > 
> > > I can
> > > > squeeze that into the soon-to-be-released 2.0.2 since it's not
> > > > a
> > > 
> > > code
> > > > change.
> > > 
> > > Solution remains the same, only meant to note that presence of
> > > either:
> > > 
> > >   PCMK_logfile
> > >   HA_logfile (likely on the way towards deprecation, preferably
> > > avoid)
> 
> Yep, which brings up the question of what OCF should do. Currently
> neither is part of the standard.
> 
> > > in the environment (from respective sysconfig/default/conf.d file
> > > for
> > > pacemaker) will trigger export of HA_LOGFILE environment variable
> > > propagated subsequently towards the agent processes, and
> > > everything
> > > then works as expected.  IOW. OCF and/or resource-agents are
> > > still
> > > reasonably decoupled, thankfully.
-- 
Ken Gaillot <kgaillot at redhat.com>



More information about the Users mailing list