[Pacemaker] Question about log-facility of STONITH plugin

Andrew Beekhof andrew at beekhof.net
Tue Feb 5 01:31:32 UTC 2013


On Fri, Feb 1, 2013 at 9:34 PM, Kazunori INOUE
<inouekazu at intellilink.co.jp> wrote:
> Hi,
>
> In recent pacemaker, is it specification that log-facility of STONITH plugin is fixed to daemon?
>
> - pacemaker-1.1 : 908ae9501b (the latest devel)
> - glue : da5832ae23
> - corosync : 66172a501a
> - RHEL6.3
>
> [ /etc/sysconfig/pacemaker ]
>  :
> export PCMK_logfacility=local1
>
> [ /etc/rsyslog.conf ]
>  :
> local1.*            /var/log/ha-log
> daemon.*            /var/log/daemon.log
>
> [ /etc/corosync/corosync.conf ]
> logging {
>         to_syslog: yes
>         to_stderr: no
>         syslog_facility: local1
>         syslog_priority: info
>  :
>
>
> It's log of RA (ping) and STONITH plugin (libvirt).
>
> $ cat /var/log/ha-log
>  :
> Feb  1 17:11:17 dev2 lrmd[24151]:   notice: operation_finished: prmPingd_start_0:24843 [ 2013/02/01_17:11:17 ERROR: Unexpected result for 'ping -n -q -W 18 -c 3  nohost' 2: ping: unknown host nohost ]
> Feb  1 17:11:17 dev2 lrmd[24151]:   notice: operation_finished: prmPingd_monitor_10000:24870 [ 2013/02/01_17:11:17 ERROR: Unexpected result for 'ping -n -q -W 18 -c 3  nohost' 2: ping: unknown host nohost ]
> Feb  1 17:11:27 dev2 lrmd[24151]:   notice: operation_finished: prmPingd_monitor_10000:24896 [ 2013/02/01_17:11:27 ERROR: Unexpected result for 'ping -n -q -W 18 -c 3  nohost' 2: ping: unknown host nohost ]
>
>
> $ crm node fence dev1
> $ cat /var/log/daemon.log
>  :
> Feb  1 17:19:06 dev2 external/libvirt[26348]: notice: Domain dev1 was stopped
> Feb  1 17:19:09 dev2 external/libvirt[26348]: notice: Domain dev1 was started
>
> $ grep libvirt /var/log/ha-log
> $
>
> The log of RA belonged to local1 which I appointed in PCMK_logfacility, but plugin belonged to daemon.
> * Since environment variable HA_LOGFACILITY was not set, ha_log.sh used daemon.
>   http://hg.linux-ha.org/glue/file/da5832ae23dd/lib/stonith/ha_log.sh#l33

Looks like we only set HA_logfacility:
   ./mcp/corosync.c:624:    set_daemon_option("logfacility",
logging_syslog_facility);

I don't recall why heartbeat developed an upper and lowercase variant.




More information about the Pacemaker mailing list