Antw: Re: Re: [Linux-HA] Logging of Stonith Agent
dejanmm at fastmail.fm
Tue Oct 9 06:05:25 MDT 2007
On Tue, Oct 09, 2007 at 01:10:08PM +0200, matilda matilda wrote:
> >>> Dejan Muhamedagic <dejanmm at fastmail.fm> 08.10.2007 17:23 >>>
> > There is no special logging procedure--just echo whatever you
> > want to say to stdout and it will find it's way to the logs.
> Hi Dejan,
> did a little test. I've implemented a can't-do-anything stonith plugin.
> Trying to start it gives:
> Oct 9 11:45:38 db02 lrmd: : info: Try to start STONITH resource <rsc_id=r_stonith-db01> : Device=external/ibmrsa-telnet
> Oct 9 11:45:38 db02 stonithd: : CRIT: external_run_cmd: stating /usr/lib/stonith/plugins/external/ibmrsa-telnet failed.
Actually, here it says that it could not stat(2) the file. The
message is a bit silly though.
> Oct 9 11:45:38 db02 stonithd: : CRIT: external_get_confignames: 'ibmrsa-telnet getconfignames' failed with rc -1
> Oct 9 11:45:38 db02 stonithd: : ERROR: Invalid config info for external/ibmrsa-telnet device.
> Oct 9 11:45:38 db02 lrmd: : ERROR: sending stonithRA op to stonithd failed.
> Oct 9 11:45:38 db02 lrmd: : WARN: mapped the invalid return code 254.
> Yes, 'getconfignames' is not implemented. If I call it manually I get the following:
> db01:/opt/ha # ./ibmrsa-telnet getconfignames
> ERROR: ibmrsa-telnet : Not implemented. Has to be defined.
> db01:/opt/ha # echo $?
> db01:/opt/ha #
> The problem is: I can't see the error message anywhere in the logs.
> If such a thing hapens in real life, administrator doesn't have any
> chance to find out what happened.
Right. In this case the plugin was not invoked but I guess that
the output would have been lost in case the debug level messages
are filtered out. I really don't know why they decided to have it
at the debug level. It is more logical to have it at the info
> Why is the return code 1 interpreted as return code -1?
Looks like it was not invoked at all.
> What does the line 'WARN: mapped the invalid return code 254' mean?
The return code -1 means "no resource agent" which is in this
case ok. Not serious, but it is a bug.
> Is your initial statement concerning printing to stdout still true?
Yes, but I'll have it changed to log at the info level. That way
the output from the agent won't be lost.
> Best regards
> Andreas Mock
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> See also: http://linux-ha.org/ReportingProblems
More information about the Linux-HA