Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: lib by blaschke from
([email protected])
2. Linux-HA CVS: tools by zhenh from
([email protected])
3. Linux-HA CVS: mgmt by zhenh from
([email protected])
4. Linux-HA CVS: resources by xunsun from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Wed, 14 Dec 2005 12:21:35 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by blaschke from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : blaschke
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/plugins/stonith
Modified Files:
README.external
Log Message:
Bug 983 - couple small modifications
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/stonith/README.external,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- README.external 12 Dec 2005 19:42:16 -0000 1.2
+++ README.external 14 Dec 2005 19:21:35 -0000 1.3
@@ -25,7 +25,7 @@
script must be a regular executable file that is NOT writable by group
or others in order to be recognized as an external plugin. If the
action requires information to be returned, such as the list of hosts
-or config names or any of the getinfo-* calls, simply write the
+or config names or any of the getinfo calls, simply write the
information to stdout. When complete, return zero to indicate the
action succeeded or non-zero to indicate the action failed. You can
use the ssh (sh) and riloe (pyhton) scripts already in that directory
@@ -42,7 +42,7 @@
stonith external/yourplugin /etc/ha.d/yourplugin.cfg
where /etc/ha.d/yourplugin.cfg contains a single line with all of your
-plugin's required parameters and any optional ones as well:
+plugin's parameters:
parm1-value parm2-value ...
@@ -89,3 +89,5 @@
the CIB are passed to the script as environment variables. For the
example above, the parameters are passed as parm1-name=parm1-value,
parm2-name=parm2-value and so on.
+
+Additional information can be found at
http://www.linux-ha.org/ExternalStonithPlugins.
------------------------------
Message: 2
Date: Wed, 14 Dec 2005 19:20:02 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : tools
Dir : linux-ha/tools
Modified Files:
haresources2cib.py.in
Log Message:
add support for lsb RA
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/haresources2cib.py.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- haresources2cib.py.in 21 Sep 2005 06:50:12 -0000 1.1
+++ haresources2cib.py.in 15 Dec 2005 02:20:01 -0000 1.2
@@ -24,7 +24,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-import sys,string
+import sys,string,os
import xml.dom.minidom
using_ocf = 1
@@ -76,7 +76,16 @@
cib.appendChild(status)
return doc, resources, constraints
-
+
+def get_ra_class(type) :
+ if os.path.exists("@HB_RA_DIR@"+"/"+type) :
+ return "heartbeat"
+ if os.path.exists("@LSB_RA_DIR@"+"/"+type) :
+ return "lsb"
+ sys.stderr.write(type+" is an unknown Resource Agent. " \
+ "Please refer to
http://www.linux-ha.org/ResourceAgent\n")
+ return "UNKNOWN"
+
def cib_resource(doc,index, rsc):
id, type, params = None, None, None
@@ -109,7 +118,8 @@
if using_ocf and type in ocf_ra_setting:
resource.setAttribute("class","ocf")
else :
- resource.setAttribute("class","heartbeat")
+ ra_class = get_ra_class(type)
+ resource.setAttribute("class",ra_class)
resource.setAttribute("provider","heartbeat")
if using_mon :
@@ -215,7 +225,6 @@
cib = create_cib()
resource_file = None
resource_file = "/etc/ha.d/haresources"
-
# Process arguments...
for arg in sys.argv[1:]:
------------------------------
Message: 3
Date: Thu, 15 Dec 2005 01:04:41 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : mgmt
Dir : linux-ha/mgmt/daemon
Modified Files:
mgmtd.c
Log Message:
remove a useless variable and add a pointer check to make BEAM happy
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmtd.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- mgmtd.c 9 Dec 2005 07:02:24 -0000 1.9
+++ mgmtd.c 15 Dec 2005 08:04:41 -0000 1.10
@@ -297,12 +297,11 @@
int
init_start ()
{
- long pid;
int ssock;
struct sockaddr_in saddr;
GIOChannel* sch;
/* register pid */
- if ((pid = cl_lock_pidfile(PID_FILE)) < 0) {
+ if (cl_lock_pidfile(PID_FILE) < 0) {
mgmt_log(LOG_ERR, "already running: [pid %d]."
, cl_read_pidfile(PID_FILE));
mgmt_log(LOG_ERR, "Startup aborted (already running)."
@@ -474,6 +473,10 @@
{
static int id = 1;
client_t* client = cl_malloc(sizeof(client_t));
+ if (client == NULL) {
+ mgmt_log(LOG_ERR, "cl_malloc failed for new client");
+ return -1;
+ }
client->id = id;
client->ch = g_io_channel_unix_new(sock);
g_io_add_watch(client->ch, G_IO_IN|G_IO_ERR|G_IO_HUP
------------------------------
Message: 4
Date: Thu, 15 Dec 2005 04:23:50 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by xunsun from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : xunsun
Host :
Project : linux-ha
Module : resources
Dir : linux-ha/resources/heartbeat
Modified Files:
IPaddr.in
Log Message:
bug 964: restore the original R1 monitor operation
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/heartbeat/IPaddr.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- IPaddr.in 7 Nov 2005 16:01:18 -0000 1.17
+++ IPaddr.in 15 Dec 2005 11:23:49 -0000 1.18
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: IPaddr.in,v 1.17 2005/11/07 16:01:18 xunsun Exp $
+# $Id: IPaddr.in,v 1.18 2005/12/15 11:23:49 xunsun Exp $
#
# Description: wrapper of OCF RA IPaddr, based on original heartbeat RA.
# See OCF RA IPaddr for more information.
@@ -34,7 +34,7 @@
usage() {
echo $USAGE >&2
- echo "$Id: IPaddr.in,v 1.17 2005/11/07 16:01:18 xunsun Exp $"
+ echo "$Id: IPaddr.in,v 1.18 2005/12/15 11:23:49 xunsun Exp $"
}
#
@@ -65,14 +65,6 @@
exit 1;;
esac
-case $2 in
- start|stop|status|monitor)
- ;;
- *) usage
- exit 1
- ;;
-esac
-
# We need to split the argument into pieces that IPaddr OCF RA can
# recognize, sed is prefered over Bash specific builtin functions
# for portability.
@@ -94,5 +86,50 @@
;;
esac
fi
+#
+# Determine if this IP address is really being served, or not.
+# Note that we don't distinguish if *we're* serving it locally...
+#
+ip_monitor() {
+ TIMEOUT=1 # seconds
+ SYSTYPE="`uname -s`"
+ case $SYSTYPE in
+ Linux)
+ # -c count -t timetolive -q(uiet) -n(umeric) -W timeout
+ PINGARGS="-c 1 -q -n $BASEIP"
+ ;;
+ SunOS)
+ PINGARGS="$BASEIP $TIMEOUT"
+ ;;
+ *)
+ PINGARGS="-c 1 -q $BASEIP"
+ ;;
+ esac
+ for j in 1 2 3
+ do
+ # for R1 style clusters, CTS runs this on the test monitor node
+ # so we cannot check to see if the IP address is served locally
+ # This means that the ARP spoofing is also tested
+ # But we can't tell for sure which node is serving the IP
+ if
+ @PING@ $PINGARGS >/dev/null 2>&1
+ then
+ exit 0
+ fi
+ done
+
+ exit 1
+}
+
+case $2 in
+ start|stop|status)
+ ;;
+ monitor)
+ ip_monitor
+ ;;
+ *) usage
+ exit 1
+ ;;
+esac
ra_execocf "rsc_id=IPaddr_$BASEIP" "rsc_type=IPaddr" "provider=heartbeat" $2
"ip=$BASEIP" "broadcast=$BROADCAST" "nic=$NIC" "netmask=$NETMASK"
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 25, Issue 34
********************************************