• 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

Revision47df73aa08d5d100fd14320220905fc179621d70 (tree)
Time2006-08-21 19:31:17
AuthorAndrew Beekhof <beekhof@gmai...>
CommiterAndrew Beekhof

Log Message

Represent 2.0.2 as it went out using CVS

Change Summary

Incremental Difference

diff -r a7354fcf024e -r 47df73aa08d5 configure.in
--- a/configure.in Wed Sep 14 16:54:31 2005 +0000
+++ b/configure.in Mon Aug 21 12:31:17 2006 +0200
@@ -10,14 +10,14 @@
1010 AC_INIT(heartbeat.spec.in)
1111
1212 AC_CONFIG_AUX_DIR(.)
13-AC_REVISION($Revision: 1.438 $) dnl cvs revision
13+AC_REVISION($Revision: 1.443 $) dnl cvs revision
1414 AC_CANONICAL_HOST
1515
1616
1717 dnl Where #defines go (e.g. `AC_CHECK_HEADERS' below)
1818 AM_CONFIG_HEADER(linux-ha/config.h include/ha_config.h)
1919 ALL_LINGUAS="en fr"
20-AM_INIT_AUTOMAKE(heartbeat, 2.0.1)
20+AM_INIT_AUTOMAKE(heartbeat, 2.0.2)
2121 RPMREL=1
2222 AC_SUBST(RPMREL)
2323 HB_PKG=heartbeat
@@ -183,6 +183,9 @@
183183 AC_MSG_WARN(Sleeping for $SNOOZING seconds.)
184184 sleep $SNOOZING
185185 fi
186+HA_URLBASE="http://linux-ha.org/"
187+AC_SUBST(HA_URLBASE)
188+AC_DEFINE_UNQUOTED(HA_URLBASE, "$HA_URLBASE", Web site base URL)
186189
187190 HA_LIBDIR="${libdir}"
188191 AC_SUBST(HA_LIBDIR)
diff -r a7354fcf024e -r 47df73aa08d5 crm/crmd/election.c
--- a/crm/crmd/election.c Wed Sep 14 16:54:31 2005 +0000
+++ b/crm/crmd/election.c Mon Aug 21 12:31:17 2006 +0200
@@ -194,11 +194,11 @@
194194 } else if(your_version == NULL) {
195195 crm_info("Election pass: they are shutting down");
196196
197- } else if(compare_version(your_version, CRM_VERSION) > 0) {
197+ } else if(compare_version(your_version, CRM_VERSION) < 0) {
198198 crm_debug("Election fail: version");
199199 we_loose = TRUE;
200200
201- } else if(compare_version(your_version, CRM_VERSION) < 0) {
201+ } else if(compare_version(your_version, CRM_VERSION) > 0) {
202202 crm_debug("Election pass: version");
203203
204204 } else if(your_node->node_born_on < our_node->node_born_on) {
diff -r a7354fcf024e -r 47df73aa08d5 crm/crmd/lrm.c
--- a/crm/crmd/lrm.c Wed Sep 14 16:54:31 2005 +0000
+++ b/crm/crmd/lrm.c Mon Aug 21 12:31:17 2006 +0200
@@ -541,7 +541,7 @@
541541 }
542542 max_call_id = op->call_id;
543543 found_op = TRUE;
544-
544+ lrm_free_op(op);
545545 );
546546 if(found_op == FALSE && g_list_length(op_list) != 0) {
547547 crm_err("Could not properly determin last op"
@@ -550,6 +550,7 @@
550550 }
551551
552552 g_list_free(op_list);
553+ lrm_free_rsc(the_rsc);
553554 );
554555
555556 g_list_free(lrm_list);
@@ -646,7 +647,9 @@
646647 rid[63] = 0;
647648
648649 rsc = fsa_lrm_conn->lrm_ops->get_rsc(fsa_lrm_conn, rid);
649- next_input = do_lrm_rsc_op(rsc, rid, operation, input->xml, input->msg);
650+ next_input = do_lrm_rsc_op(rsc, rid, operation, input->xml,
651+ input->msg);
652+ lrm_free_rsc(rsc);
650653
651654 } else {
652655 crm_err("Operation was neither a lrm_query, nor a rsc op. %s",
diff -r a7354fcf024e -r 47df73aa08d5 heartbeat.spec.in
--- a/heartbeat.spec.in Wed Sep 14 16:54:31 2005 +0000
+++ b/heartbeat.spec.in Mon Aug 21 12:31:17 2006 +0200
@@ -1,4 +1,4 @@
1-# $Id: heartbeat.spec.in,v 1.146 2005/09/14 16:54:31 gshi Exp $
1+# $Id: heartbeat.spec.in,v 1.148 2005/09/22 20:17:35 alan Exp $
22
33 # Workaround for a change in RPM 4.1.x; needs proper fixing soon!
44 ##%define _unpackaged_files_terminate_build 0
@@ -77,6 +77,16 @@
7777 implementing any number of interfaces.
7878
7979 %changelog
80+* Thu Sep 22 2005 Alan Robertson <alanr@unix.sh> (see doc/AUTHORS file)
81++ Version 2.0.2 - small bug fix only release
82+ + Fixed a bug in ping directive - it works again
83+ + Added a check to BasicSanityCheck to check ping and ping_group directives
84+ + fixed cl_status nodestatus to return 0 if a node has status "ping"
85+ + fixed a memory leak in the CRM's LRM interface code
86+ + fixed code which deterimines which version of the CRM becomes
87+ the DC when basic CIB schema versions differ. It now prefers
88+ the older version to be DC instead of the newer version.
89+
8090 * Wed Sep 14 2005 Alan Robertson <alanr@unix.sh> (see doc/AUTHORS file)
8191 + Version 2.0.1 -
8292 + Communication Layer
diff -r a7354fcf024e -r 47df73aa08d5 heartbeat/lib/BasicSanityCheck.in
--- a/heartbeat/lib/BasicSanityCheck.in Wed Sep 14 16:54:31 2005 +0000
+++ b/heartbeat/lib/BasicSanityCheck.in Mon Aug 21 12:31:17 2006 +0200
@@ -113,7 +113,7 @@
113113 #
114114 CheckConfigFile() {
115115 if
116- [ ! -f $1 ]
116+ [ ! -f $1 ]
117117 then
118118 return 0
119119 fi
@@ -159,6 +159,8 @@
159159 stonith_host * null $LOCALNODE $DUMMYNODE
160160 mcast $INTERFACE $MCASTIP 694 0 0
161161 #bcast $INTERFACE
162+ ping 127.0.0.1
163+ ping_group pingus_please 127.0.0.1
162164 node $LOCALNODE $DUMMYNODE
163165 use_logd off
164166 respawn @HA_CCMUSER@ $HBLIB/ccm
@@ -182,6 +184,8 @@
182184 initdead 5
183185 mcast $INTERFACE $MCASTIP 694 0 0
184186 #bcast $INTERFACE
187+ ping 127.0.0.1
188+ ping_group pingus_please 127.0.0.1
185189 node $LOCALNODE $DUMMYNODE
186190 use_logd off
187191 crm yes
@@ -209,7 +213,7 @@
209213 !
210214 chmod 644 $1
211215 }
212-CONFIGFILES="$HADIR/ha.cf $HADIR/authkeys $HADIR/haresources @HA_VARLIBDIR@/heartbeat/crm/cib.xml @HA_VARLIBDIR@/heartbeat/crm/cib_backup.xml"
216+CONFIGFILES="$HADIR/ha.cf $HADIR/authkeys $HADIR/haresources @HA_VARLIBDIR@/heartbeat/crm/cib.xml @HA_VARLIBDIR@/heartbeat/crm/cib_backup.xml @HA_VARLIBDIR@/heartbeat/hostcache"
213217
214218 SetUpConfigFiles() {
215219 if
@@ -263,7 +267,8 @@
263267 }
264268
265269 RestoreConfigFiles() {
266- mv $HADIR/.cfsave/cib*.xml @HA_VARLIBDIR@/heartbeat/crm/ >/dev/null 2>&1
270+ mv $HADIR/.cfsave/cib*.xml @HA_VARLIBDIR@/heartbeat/crm/ >/dev/null 2>&1
271+ mv $HADIR/.cfsave/hostcache @HA_VARLIBDIR@/heartbeat/ >/dev/null 2>&1
267272 mv $HADIR/.cfsave/* $HADIR >/dev/null 2>&1
268273 }
269274
@@ -384,14 +389,17 @@
384389 echo "$CLSTATUS shows heartbeat not running ($?)" | tee -a $LOGFILE
385390 errcount=`expr $errcount + 1`
386391 fi
387- if
388- $CLSTATUS nodestatus $LOCALNODE >/dev/null 2>&1
389- then
390- : OK
391- else
392- echo "$CLSTATUS shows local status as dead ($?)" | tee -a $LOGFILE
393- errcount=`expr $errcount + 1`
394- fi
392+ for node in $LOCALNODE 127.0.0.1 pingus_please
393+ do
394+ if
395+ $CLSTATUS nodestatus $node >/dev/null 2>&1
396+ then
397+ : $node status is OK
398+ else
399+ echo "$CLSTATUS shows status of [$node] as dead ($?)" | tee -a $LOGFILE
400+ errcount=`expr $errcount + 1`
401+ fi
402+ done
395403
396404 #
397405 # Heartbeat seems to be running...
@@ -837,6 +845,7 @@
837845 fi
838846
839847 SAVELOG=/tmp/linux-ha.testlog
848+chmod a+r $LOGFILE
840849 mv $LOGFILE $SAVELOG
841850 echo "$errcount errors. Log file is stored in $SAVELOG"
842851 exit $errcount
diff -r a7354fcf024e -r 47df73aa08d5 heartbeat/libnet_util/send_arp.c
--- a/heartbeat/libnet_util/send_arp.c Wed Sep 14 16:54:31 2005 +0000
+++ b/heartbeat/libnet_util/send_arp.c Mon Aug 21 12:31:17 2006 +0200
@@ -1,4 +1,4 @@
1-/* $Id: send_arp.c,v 1.21 2005/08/29 01:44:57 sunjd Exp $ */
1+/* $Id: send_arp.c,v 1.22 2005/09/21 10:30:16 andrew Exp $ */
22 /*
33 * send_arp
44 *
@@ -190,7 +190,11 @@
190190 unlink(pidfilename);
191191 return EXIT_FAILURE;
192192 }
193+#ifdef ON_DARWIN
194+ if ((signed)(ip = libnet_name2addr4(l, (unsigned char *)ipaddr, 1)) == -1) {
195+#else
193196 if ((signed)(ip = libnet_name2addr4(l, ipaddr, 1)) == -1) {
197+#endif
194198 cl_log(LOG_ERR, "Cannot resolve IP address [%s]", ipaddr);
195199 unlink(pidfilename);
196200 return EXIT_FAILURE;
@@ -672,6 +676,9 @@
672676
673677 /*
674678 * $Log: send_arp.c,v $
679+ * Revision 1.22 2005/09/21 10:30:16 andrew
680+ * Darwin wants an unsigned char* for ipaddr
681+ *
675682 * Revision 1.21 2005/08/29 01:44:57 sunjd
676683 * bug799: move rsctmp to /var/run/heartbeat
677684 *
diff -r a7354fcf024e -r 47df73aa08d5 lib/plugins/HBcomm/ping.c
--- a/lib/plugins/HBcomm/ping.c Wed Sep 14 16:54:31 2005 +0000
+++ b/lib/plugins/HBcomm/ping.c Mon Aug 21 12:31:17 2006 +0200
@@ -1,4 +1,4 @@
1-/* $Id: ping.c,v 1.44 2005/08/15 21:12:16 gshi Exp $ */
1+/* $Id: ping.c,v 1.45 2005/09/22 16:52:06 alan Exp $ */
22 /*
33 * ping.c: ICMP-echo-based heartbeat code for heartbeat.
44 *
@@ -291,7 +291,7 @@
291291 * FIXME!!
292292 */
293293
294-char ping_pkt[MAXLINE];
294+static char ping_pkt[MAXLINE];
295295 static void *
296296 ping_read(struct hb_media* mp, int *lenp)
297297 {
@@ -360,8 +360,8 @@
360360
361361 pktlen = numbytes - hlen - ICMP_HDR_SZ;
362362
363+ memcpy(ping_pkt, buf.cbuf + hlen + ICMP_HDR_SZ, pktlen);
363364 ping_pkt[pktlen] = 0;
364-
365365 *lenp = pktlen + 1;
366366
367367 msg = wirefmt2msg(msgstart, bufmax - msgstart, MSG_NEEDAUTH);
@@ -370,7 +370,7 @@
370370 return(NULL);
371371 }
372372 comment = ha_msg_value(msg, F_COMMENT);
373- if (comment == NULL || strcmp(comment, PIL_PLUGIN_S)) {
373+ if (comment == NULL || strcmp(comment, PIL_PLUGIN_S) != 0) {
374374 ha_msg_del(msg);
375375 errno = EINVAL;
376376 return(NULL);
diff -r a7354fcf024e -r 47df73aa08d5 tools/cl_status.c
--- a/tools/cl_status.c Wed Sep 14 16:54:31 2005 +0000
+++ b/tools/cl_status.c Mon Aug 21 12:31:17 2006 +0200
@@ -429,7 +429,8 @@
429429 }
430430
431431 if ( STRNCMP_CONST(status, "active") == 0
432- || STRNCMP_CONST(status, "up") == 0) {
432+ || STRNCMP_CONST(status, "up") == 0
433+ || STRNCMP_CONST(status, "ping") == 0) {
433434 ret = OK; /* the node is active */
434435 } else {
435436 ret = NORMAL_FAIL; /* the status = "dead" */
Show on old repository browser