[Linux-HA] External stonith plugin for V2.0.2
debltc at us.ibm.com
Mon Oct 10 13:20:34 MDT 2005
Etienne van Tonder wrote:
>I am totally confused, I'm hoping someone can help me.
>I've installed the latest version of heartbeat in the hope of using the
>external stonith module to shutdown an apc-smart ups that I'm using with a
>USB cable. I can't use the serial interface as I only have one serial port
>and it's being used for something else, apart from that I have tried stonith
>with the serial port and I keep getting errors.
>My plan was to use the external plugin to run a script that would call
>apcupsd to shutdown the ups. I've written and tested the script and it works
>as expected. I've read the README.external in the CVS and it does not seem
>to apply to the latest version. When I do a stonith -h it no longer displays
>external as an option, only external/ssh and external/riloe, there is no
>external script in the external directory anymore (there use to be one in
This behavior is as expected, the external STONITH plugin support was
changed several months ago so that now there is no 'external' plugin,
rather all of the scripts in /usr/lib/stonith/plugins/external are
treated as external plugins. These scripts need to be regular files
that are executable but not writable by groups/others. They also need
to respond to all of the possible commands (gethosts, on, off, etc.)
>>From the changelog it says "fully supports scripting interface" so it seems
>I have to write my own external plugin script??
>I tried testing the external options using stonith from the command line but
>I keep getting:
>stonith: external ssh device not accessible
Hmmm, how are you invoking stonith? This error message makes it look
like you are using "stonith -t external ssh ..." when it should be
"stonith -t external/ssh ..."
>Can anyone please explain to me how this is all meant to work.
Basically, put an executable script in the aforementioned directory that
handles all possible commands and returns the appropriate output and
error code. Please see the ssh external STONITH plugin as an example.
>One other question does heartbeat depend on the return code from this script
>to determine if the ups/machine has been shutdown or is this done via the
>heartbeat (via eth1/tty), ie no heartbeat means ups shutdown worked??
Yes, zero must be returned if command was successful, non-zero if not.
Again, see the ssh external STONITH plugin.
>Linux-HA mailing list
>Linux-HA at lists.linux-ha.org
>See also: http://linux-ha.org/ReportingProblems
More information about the Linux-HA