• R/O
  • SSH

pm_diskd: Commit

※ リポジトリは、pm-diskd ブランチが https://github.com/linux-ha-japan/pm_diskd-1.0 へ、pm-diskd-2.0ブランチが https://github.com/linux-ha-japan/pm_diskd へ移行しました。

Pacemaker 対応ディスク故障監視機能。

Pacemaker-1.0公式リポジトリのクローンに対し、パッチ作成用のブランチを作成して管理する。
ブランチ名: pm-diskd

初回 hg clone 実行後は、hg update -r pm-diskd を実行すること。

Heartbeat-2.1.4 用 hb-diskd(*) のPacemaker対応版
(*) http://sourceforge.jp/projects/linux-ha/releases/?package_id=10555


Commit MetaInfo

Revision2d298bca0d0af320752bfa293ac96ed08e2c6463 (tree)
Time2007-01-12 10:42:41
AuthorAlan Robertson <alanr@unix...>
CommiterAlan Robertson

Log Message

OSDL 1292 - xSeries STONITH (IBM: 06-R212-175

Change Summary

Incremental Difference

diff -r 6b1e0152c9a3 -r 2d298bca0d0a configure.in
--- a/configure.in Tue Jan 09 09:35:47 2007 -0700
+++ b/configure.in Thu Jan 11 18:42:41 2007 -0700
@@ -2793,8 +2793,9 @@
27932793 lib/plugins/stonith/Makefile \
27942794 lib/plugins/stonith/ribcl.py \
27952795 lib/plugins/stonith/external/Makefile \
2796+ lib/plugins/stonith/external/ibmrsa \
2797+ lib/plugins/stonith/external/riloe \
27962798 lib/plugins/stonith/external/ssh \
2797- lib/plugins/stonith/external/riloe \
27982799 lib/plugins/AppHBNotification/Makefile \
27992800 lib/plugins/HBcompress/Makefile \
28002801 lib/plugins/quorum/Makefile \
diff -r 6b1e0152c9a3 -r 2d298bca0d0a lib/plugins/stonith/external/.cvsignore
--- a/lib/plugins/stonith/external/.cvsignore Tue Jan 09 09:35:47 2007 -0700
+++ b/lib/plugins/stonith/external/.cvsignore Thu Jan 11 18:42:41 2007 -0700
@@ -1,4 +1,5 @@
11 Makefile
22 Makefile.in
3+ibmrsa
4+riloe
35 ssh
4-riloe
diff -r 6b1e0152c9a3 -r 2d298bca0d0a lib/plugins/stonith/external/Makefile.am
--- a/lib/plugins/stonith/external/Makefile.am Tue Jan 09 09:35:47 2007 -0700
+++ b/lib/plugins/stonith/external/Makefile.am Thu Jan 11 18:42:41 2007 -0700
@@ -21,5 +21,4 @@
2121
2222 extdir = $(stonith_ext_plugindir)
2323
24-ext_SCRIPTS = ssh riloe
25-
24+ext_SCRIPTS = ibmrsa riloe ssh
diff -r 6b1e0152c9a3 -r 2d298bca0d0a lib/plugins/stonith/external/ibmrsa.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/plugins/stonith/external/ibmrsa.in Thu Jan 11 18:42:41 2007 -0700
@@ -0,0 +1,175 @@
1+#!/bin/sh
2+#
3+# Copyright (c) 2006 Dejan Muhamedagic <dmuhamedagic@at.ibm.com>, IBM Austria
4+#
5+# External STONITH module for IBM RSA adapters.
6+# External STONITH module for IBM BMC.
7+# This STONITH module depends on IBMmpcli.
8+#
9+# See
10+# http://www-307.ibm.com/pc/support/site.wss/MIGR-54214.html
11+# and
12+# http://www.redbooks.ibm.com/abstracts/sg246495.html
13+# for documentation about IBM management processors and the
14+# IBMmpcli utility.
15+#
16+#
17+
18+#DEBUGF=/var/log/ha-ibmrsa.log
19+#touch $DEBUGF
20+#chmod 600 $DEBUGF
21+
22+#exec 2>>$DEBUGF
23+
24+#function debug() {
25+# cat >&2
26+#}
27+
28+#echo "started with: $@" | debug
29+
30+HA_VARRUNDIR=/var/run/heartbeat
31+outf=$HA_VARRUNDIR/ibmrsa-$$
32+touch $outf
33+if [ ! -f $outf ]
34+then
35+ echo "cannot create temporary file $outf"
36+ exit 1
37+fi
38+trap "cat $outf >&2; rm -f $outf" EXIT
39+
40+function chkmpcli() {
41+ test -x /opt/IBMmpcli/bin/MPCLI.sh
42+}
43+function mpcli() {
44+ chkmpcli || {
45+ echo "IBM mpcli not installed"
46+ return 1
47+ }
48+ if [ x = "x$ipaddr" -o x = "x$userid" -o x = "x$passwd" ]
49+ then
50+ echo "ipaddr, userid, or passwd missing; check configuration"
51+ return 1
52+ fi
53+ type=${type:-"ibm"}
54+
55+ test -f /etc/ha.d/ibmrsa.debug && set -x
56+ goodstg="SUCCESS"
57+ failstg="FAILURE"
58+ (
59+ echo "logonip -h $ipaddr -u $userid -p $passwd -t $type"
60+ echo "outputfile $outf"
61+ cat
62+ ) | /opt/IBMmpcli/bin/MPCLI.sh | grep -w $goodstg >/dev/null 2>&1
63+ rc=$?
64+ grep -w $failstg $outf
65+ test $rc -eq 0 -a $? -eq 1
66+}
67+function ibmrsa_reboot() {
68+ echo restart -now | mpcli
69+}
70+function ibmrsa_poweron() {
71+ echo poweron | mpcli
72+}
73+function ibmrsa_poweroff() {
74+ echo poweroff | mpcli
75+}
76+function ibmrsa_status() {
77+ echo | mpcli
78+}
79+
80+case $1 in
81+gethosts)
82+ echo $hostname
83+ ;;
84+on)
85+ ibmrsa_poweron
86+ ;;
87+off)
88+ ibmrsa_poweroff
89+ ;;
90+reset)
91+ ibmrsa_reboot
92+ ;;
93+status)
94+ ibmrsa_status
95+ ;;
96+getconfignames)
97+ for i in hostname ipaddr userid passwd type; do
98+ echo $i
99+ done
100+ ;;
101+getinfo-devid)
102+ echo "IBM MP STONITH device"
103+ ;;
104+getinfo-devname)
105+ echo "IBM MP STONITH device"
106+ ;;
107+getinfo-devdescr)
108+ echo "IBM MP host reboot/poweron/poweroff"
109+ ;;
110+getinfo-devurl)
111+ echo "http://www.ibm.com"
112+ ;;
113+getinfo-xml)
114+ cat <<EOF
115+<parameters>
116+
117+<parameter name="hostname" unique="1">
118+<content type="string" />
119+<shortdesc lang="en">
120+Hostname
121+</shortdesc>
122+<longdesc lang="en">
123+The hostname of the host to be managed by this STONITH device
124+</longdesc>
125+</parameter>
126+
127+<parameter name="ipaddr" unique="1">
128+<content type="string" />
129+<shortdesc lang="en">
130+IP Address
131+</shortdesc>
132+<longdesc lang="en">
133+The IP address of the STONITH device
134+</longdesc>
135+</parameter>
136+
137+<parameter name="userid" unique="1">
138+<content type="string" />
139+<shortdesc lang="en">
140+Login
141+</shortdesc>
142+<longdesc lang="en">
143+The username used for logging in to the STONITH device
144+</longdesc>
145+</parameter>
146+
147+<parameter name="passwd" unique="1">
148+<content type="string" />
149+<shortdesc lang="en">
150+Password
151+</shortdesc>
152+<longdesc lang="en">
153+The password used for logging in to the STONITH device
154+</longdesc>
155+</parameter>
156+
157+<parameter name="type">
158+<content type="string" />
159+<shortdesc lang="en">
160+Management processor type
161+</shortdesc>
162+<longdesc lang="en">
163+The type of the management processor. Possible values are
164+"ibm" (default, typically used for RSA) and "ipmi"
165+(for IPMI compliant processors such as BMC).
166+</longdesc>
167+</parameter>
168+
169+</parameters>
170+EOF
171+ ;;
172+*)
173+ exit 1
174+ ;;
175+esac
Show on old repository browser