Hi,
I tried to write my own stonith plugin (attached) but I still have some
problem.
When I start the cluster (2node) both stonith resources come up online.
But after some time without touching the cluster I get:
stonithd[15955]: 2008/08/21_10:32:29 info: external_run_cmd: Calling
'/usr/lib/stonith/plugins/external/racadm status' returned 256
Any idea why this should return 256?
BR
Bjoern
Björn Boschman schrieb:
Hi,
I wanted to ask if any on this list uses STONITH for DELL poweredge R200
incl. DRAC IV servers.
The drac3.so does not work with DRAC IV.
I tried to write my own plugin using racadm, but it does not support
chassis power status.
Anyone got a working solution for these DELL servers?
BR
Bjoern
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
#!/bin/sh
#
# External STONITH module using racadm.
# This modules uses uses the RACADM program available from
# http://RACADM.sf.net/ for actual communication with the
# managed device.
#
# Copyright (c) 2007 Martin Bene <[EMAIL PROTECTED]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it would be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Further, this software is distributed without any warranty that it is
# free of the rightful claim of any third person regarding infringement
# or the like. Any license provided herein, whether implied or
# otherwise, applies only to this software file. Patent licenses, if
# any, provided herein do not apply to combinations of this program with
# other software, or any other product whatsoever.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
#
RESET="serveraction hardreset"
POWEROFF="serveraction powerdown"
POWERON="serveraction powerup"
STATUS="getsysinfo"
RACADM=/usr/bin/racadm
usage() {
echo "Usage: $0
{on|off|reset|status|gethosts|getconfignames|getinfo-devid|getinfo-devname|getinfo-devdescr|getinfo-devurl|getinfo-xml}"
}
have_racadm() {
test -x "${RACADM}"
}
do_racadm() {
have_racadm || {
echo "RACADM not installed"
return 1
}
if [ -z "${ipaddr}" -o -z "${userid}" -o -z "${passwd}" ]; then
echo "ipaddr, userid or password missing; check configuration"
return 1
fi
${RACADM} -r ${ipaddr} -u ${userid} -p ${passwd} ${1} || {
echo "error executing racadm command"
return 1
}
}
case ${1} in
gethosts)
echo ${hostname}
exit 0
;;
on)
res=1
do_racadm "${POWERON}"
res=$?
exit ${res}
;;
off)
res=1
do_racadm "${POWEROFF}"
res=$?
exit ${res}
;;
reset)
res=1
do_racadm "${RESET}"
res=$?
exit $res
;;
status)
do_racadm "${STATUS}"
exit $?
;;
getconfignames)
echo "hostname ipaddr userid passwd"
exit 0
;;
getinfo-devid)
echo "racadm STONITH device"
exit 0
;;
getinfo-devname)
echo "racadm STONITH external device"
exit 0
;;
getinfo-devdescr)
echo "racadm-based host reset"
exit 0
;;
getinfo-devurl)
echo "http://support.dell.com/support/edocs/software/smdrac3/"
exit 0
;;
getinfo-xml)
cat << racadmXML
<parameters>
<parameter name="hostname" unique="1">
<content type="string" />
<shortdesc lang="en">
Hostname
</shortdesc>
<longdesc lang="en">
The name of the host to be managed by this STONITH device
</longdesc>
</parameter>
<parameter name="ipaddr" unique="1">
<content type="string" />
<shortdesc lang="en">
IP Address
</shortdesc>
<longdesc lang="en">
The IP address of the STONITH device
</longdesc>
</parameter>
<parameter name="userid" unique="1">
<content type="string" />
<shortdesc lang="en">
Login
</shortdesc>
<longdesc lang="en">
The username used for logging in to the STONITH device
</longdesc>
</parameter>
<parameter name="passwd" unique="1">
<content type="string" />
<shortdesc lang="en">
Password
</shortdesc>
<longdesc lang="en">
The password used for logging in to the STONITH device
</longdesc>
</parameter>
</parameters>
racadmXML
exit 0
;;
*)
usage
exit 1
;;
esac
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems