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

Patrick H. pacemaker at feystorm.net
Sun Nov 6 23:45:02 UTC 2011


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20111106/b4cd95ba/attachment-0003.html>


More information about the Pacemaker mailing list