[Pacemaker] cluster.conf log facility setting discarded if pacemakerd running as a daemon

Andrew Beekhof andrew at beekhof.net
Mon Nov 14 00:44:16 UTC 2011


On Mon, Nov 7, 2011 at 10:45 AM, Patrick H. <pacemaker at feystorm.net> wrote:
> I'm using cman and have been trying to set the syslog facility for all of
> the pacemaker processes (crmd, lrmd, etc) without much luck. So after google
> searches failing me on how to configure the syslog facility for pacemaker
> when launched from cman, I went digging through the source and found my
> issue.
> Basically it boils down to that if pacemakerd was started with -f, it uses
> the setting from the cluster.conf, however if its started as a daemon, it
> reads the setting, and then discards it.
>
> From skimming the source code (version 1.1.5), this is my understanding of
> whats happening:
> mcp/corosync.c:628 reads uses the cluster.conf syslog_facility and sets the
> env var HA_logfacility
> mcp/pacemaker.c:686 calls crm_log_init_quiet if running as a daemon which
> unsets the env var HA_logfacility (lib/common/utils.c:684)
> All the applications then look for HA_logfacility and when they dont find
> it, they default to 'daemon'
>
> Is this intended behavior, or a bug?

Bug :-(
It looks like we made the following change after 1.1.5 went out:
    https://github.com/ClusterLabs/pacemaker/commit/ccb5176.patch

>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs:
> http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>
>




More information about the Pacemaker mailing list