[Pacemaker] ocf_log

Steve Kwee skwee at itw.de
Fri Apr 17 11:28:38 UTC 2009


Andrew Beekhof <beekhof at ...> writes:                                             

> 
> On Fri, Apr 17, 2009 at 01:04, Steve Kwee <skwee at ...> wrote:
> > Hi,
> >
> > Can someone point me to the proper way to debug OCF RAs ?
> > Looking  at the source of the existing RAs I found ocf_log and ha_log
> > and ha_debug.
> > I followed the source to .ocf-shellfuncs  and /etc/ha.d/shellfuncs
> > but I did not understand where to configure the logging.
> > I played around with ha.cf but did not get any of the messages in the
> > drbd and LVM RAs.
> 
> Right, its controlled by the logging settings in ha.cf
> 
> Try adding:
> 
> logfacility	daemon
> debug       1
> 
> this should ensure the RA logs show up in the same place as the rest
> of the cluster logging.
> or, simply log all your test messages as errors so that they are 
> always printed.
> 
> ocf_log err "Some message"
> 
> >
> > Background: I am using linux ha since a week now and at least I have a 
> > simple
> > drbd-cluster running. I use the current 1.0.3 pacemaker binaries from 
> > openSUSE
> > ha-clustering on openSUSE-11.1
> > As it seems these binaries support only openAIS and not heartbeat, 
> > so I go with
> > that and it seems to work fine.
> > As basic-configuration for openAIS and ha.cf I used the one from 
    the wiki at
> > www.clusterlabs.org
> >
> > Thanks
> >
> >
> >
> > _______________________________________________
> > Pacemaker mailing list
> > Pacemaker at ...
> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >
> 
Thank you for the quick answer.

In my /etc/ha.cf I now have:
debug		1
use_logd	false
logfacility    	daemon

I get all crit, error, warning and info messags in the syslog.

But I have still some questions.

1. Is http://www.linux-ha.org/wiki/Ha.cf#debug_-_set_debug_level
still valid concerning the changing of the debuglevel ?
I says:
..Additionally, the debug level of the system can be dynamically changed by
sending the heartbeat process SIGUSR1 and SIGUSR2 signals. SIGUSR1 raises the
debug level, and SIGUSR2 lowers it. A sample debug directive is shown below.

Which process should the signal be sent to ?
Converning the logging of RA-Agents the lrmd ?

If not how do I change the debuglevel ?
I guess there is a better option than "rcopenais restart"

2. Is there a relation between ha.cf/debug and the loglevels 
and if where can i find it ?

3. I was not able to get any message of type debug
I can force my own test messages to become visibile by using "err"

How can I get the debug-level messages i.e. from the drbd RA ?
Messages of level debug go to /etc/ha.d/shellfuncs:ha_debug

What is the appropriate logging solution and how can I configure it in
a openAIS / pacemacker setup ?

I read a lot of hints on using the logger daemon ha_logd in combination with
ha_logger. Is this still valid and how do I configure it ?
ha.cf: use_logd	true
seems not to work

Sorry for so many questions.
I can post a summary on logging when things sort out





More information about the Pacemaker mailing list