Hi Kazutomo-san, On Fri, Feb 19, 2010 at 05:36:36PM +0900, NAKAHIRA Kazutomo wrote: > Hi, all > > I noticed that RA output same log twice to the syslog > when Heartbeat uses syslog instead of logd. > > -- example of logs -- > Feb 4 17:32:16 test-1 sfex[9804]: INFO: sfex_daemon: starting... > Feb 4 17:32:16 test-1 lrmd: [9746]: info: RA output: > (prmExPostgreSQLDB:start:stderr) 2010/02/04_17:32:16 INFO: sfex_daemon: > starting... > ----
Yes, I've noticed this too. > It seems that ha_log() in the .ocf-shellfuncs does not return 0 > when logger command succeeded. Is it intended operation? Probably not though I doubt that anybody's checking the exit code of ocf_log. > If it is not intended operation, then I suggest attached patch. Well, the logging has always worked inclusively, i.e. the output goes according to the all options set (logfacility, logfile, debugfile). So, your patch would be a regression. I'm not sure what is actually sending the log message to stderr. Thanks, Dejan > Best regards, > NAKAHIRA Kazutomo > # HG changeset patch > # User NAKAHIRA Kazutomo <[email protected]> > # Date 1265790964 -32400 > # Node ID 47609277982e9dceec81423a24a4e028101bccbe > # Parent a3db4fe3930158e0a491e8b38b5db37f61eb9505 > Prevent double output of ocf_log > > diff -r a3db4fe39301 -r 47609277982e heartbeat/.ocf-shellfuncs.in > --- a/heartbeat/.ocf-shellfuncs.in Mon Feb 08 15:04:09 2010 +0100 > +++ b/heartbeat/.ocf-shellfuncs.in Wed Feb 10 17:36:04 2010 +0900 > @@ -181,6 +181,9 @@ > *INFO*|info) loglevel=info;; > esac > logger -t "$HA_LOGTAG" -p ${HA_LOGFACILITY}.${loglevel} "${*}" > + if [ "$?" -eq "0" ] ; then > + return 0 > + fi > fi > if > [ -n "$HA_LOGFILE" ] > @@ -216,6 +219,9 @@ > then > : logging through syslog > logger -t "$HA_LOGTAG" -p "${HA_LOGFACILITY}.debug" "${*}" > + if [ "$?" -eq "0" ] ; then > + return 0 > + fi > fi > if > [ -n "$HA_DEBUGLOG" ] > _______________________________________________________ > Linux-HA-Dev: [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ _______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
