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: crm by andrew from
([email protected])
2. Linux-HA CVS: cts by andrew from
([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
4. Linux-HA CVS: crm by andrew from
([email protected])
5. Linux-HA CVS: cts by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Wed, 19 Apr 2006 07:26:02 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm
Modified Files:
crm-1.0.dtd
Log Message:
For consistency, put the instance_attributes first
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crm-1.0.dtd,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- crm-1.0.dtd 19 Apr 2006 13:23:46 -0000 1.60
+++ crm-1.0.dtd 19 Apr 2006 13:26:02 -0000 1.61
@@ -85,7 +85,7 @@
on_fail (nothing|block|stop|fence) #IMPLIED>
<!-- Annotated version -->
-<!ELEMENT group (primitive+,instance_attributes*)>
+<!ELEMENT group (instance_attributes*, primitive+)>
<!ATTLIST group
id CDATA #REQUIRED
description CDATA #IMPLIED
------------------------------
Message: 2
Date: Wed, 19 Apr 2006 07:48:50 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : cts
Dir : linux-ha/cts
Modified Files:
CTSlab.py.in
Log Message:
Always set a value for DoBSC
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CTSlab.py.in,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- CTSlab.py.in 19 Apr 2006 12:17:17 -0000 1.59
+++ CTSlab.py.in 19 Apr 2006 13:48:50 -0000 1.60
@@ -691,6 +691,7 @@
Environment["RecvLoss"] = RecvLoss
Environment["IPBase"] = IPBase
Environment["SuppressCib"] = SuppressCib
+ Environment["DoBSC"] = 0
Environment["use_logd"] = 0
Environment["logfacility"] = LogFacility
------------------------------
Message: 3
Date: Wed, 19 Apr 2006 08:21:05 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm
Modified Files:
crm-1.0.dtd
Log Message:
This is way less restrictive than i'd like but i dont appear to have a choice
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crm-1.0.dtd,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- crm-1.0.dtd 19 Apr 2006 13:26:02 -0000 1.61
+++ crm-1.0.dtd 19 Apr 2006 14:21:05 -0000 1.62
@@ -213,7 +213,7 @@
<!-- Annotated version -->
<!ELEMENT status (node_state*)>
-<!ELEMENT node_state ((transient_attributes|lrm), (transient_attributes|lrm))>
+<!ELEMENT node_state (transient_attributes|lrm)*>
<!ATTLIST node_state
id CDATA #REQUIRED
uname CDATA #REQUIRED
------------------------------
Message: 4
Date: Wed, 19 Apr 2006 08:21:39 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/tengine
Modified Files:
actions.c
Log Message:
Need to include the interval
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/actions.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- actions.c 9 Apr 2006 14:50:25 -0000 1.21
+++ actions.c 19 Apr 2006 14:21:39 -0000 1.22
@@ -1,4 +1,4 @@
-/* $Id: actions.c,v 1.21 2006/04/09 14:50:25 andrew Exp $ */
+/* $Id: actions.c,v 1.22 2006/04/19 14:21:39 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -316,6 +316,7 @@
crm_xml_add(xml_op, XML_LRM_ATTR_TASK, task);
crm_xml_add(xml_op, XML_LRM_ATTR_OPSTATUS, code);
crm_xml_add(xml_op, XML_LRM_ATTR_CALLID, "-1");
+ crm_xml_add_int(xml_op, XML_LRM_ATTR_INTERVAL, action->interval);
crm_xml_add(xml_op, XML_LRM_ATTR_RC, code);
crm_xml_add(xml_op, XML_ATTR_ORIGIN, __FUNCTION__);
------------------------------
Message: 5
Date: Wed, 19 Apr 2006 08:51:10 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : cts
Dir : linux-ha/cts
Modified Files:
CTS.py.in
Log Message:
tabs -> spaces
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CTS.py.in,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- CTS.py.in 19 Apr 2006 11:57:02 -0000 1.56
+++ CTS.py.in 19 Apr 2006 14:51:09 -0000 1.57
@@ -73,12 +73,12 @@
sysname = args[0]
command = args[1]
- #print "sysname: %s, us: %s" % (sysname, self.OurNode)
- if sysname == None or string.lower(sysname) == self.OurNode or sysname
== "localhost":
- ret = command
- else:
- ret = self.Command + " " + sysname + " '" + self._fixcmd(command) +
"'"
- #print ("About to run %s\n" % ret)
+ #print "sysname: %s, us: %s" % (sysname, self.OurNode)
+ if sysname == None or string.lower(sysname) == self.OurNode or sysname
== "localhost":
+ ret = command
+ else:
+ ret = self.Command + " " + sysname + " '" + self._fixcmd(command)
+ "'"
+ #print ("About to run %s\n" % ret)
return ret
def _cmd_noblock(self, *args):
@@ -90,12 +90,12 @@
sysname = args[0]
command = args[1]
- #print "sysname: %s, us: %s" % (sysname, self.OurNode)
- if sysname == None or string.lower(sysname) == self.OurNode or sysname
== "localhost":
- ret = command + " &"
- else:
- ret = self.CommandnoBlock + " " + sysname + " '" +
self._fixcmd(command) + "'"
- #print ("About to run %s\n" % ret)
+ #print "sysname: %s, us: %s" % (sysname, self.OurNode)
+ if sysname == None or string.lower(sysname) == self.OurNode or sysname
== "localhost":
+ ret = command + " &"
+ else:
+ ret = self.CommandnoBlock + " " + sysname + " '" +
self._fixcmd(command) + "'"
+ #print ("About to run %s\n" % ret)
return ret
def __call__(self, *args):
@@ -159,22 +159,22 @@
def echo_cp(self, src_host, src_file, dest_host, dest_file):
'''Perform a remote copy via echo'''
- (rc, lines) = self.remote_py(src_host, "os", "system", "cat %s" %
src_file)
- if rc != 0:
- print "Copy of %s:%s failed" % (src_host, src_file)
-
- elif dest_host == None:
- fd = open(dest_file, "w")
- fd.writelines(lines)
- fd.close()
-
- else:
- big_line=""
- for line in lines:
- big_line = big_line + line
- (rc, lines) = self.remote_py(dest_host, "os", "system", "echo '%s'
> %s" % (big_line, dest_file))
+ (rc, lines) = self.remote_py(src_host, "os", "system", "cat %s" %
src_file)
+ if rc != 0:
+ print "Copy of %s:%s failed" % (src_host, src_file)
+
+ elif dest_host == None:
+ fd = open(dest_file, "w")
+ fd.writelines(lines)
+ fd.close()
- return rc
+ else:
+ big_line=""
+ for line in lines:
+ big_line = big_line + line
+ (rc, lines) = self.remote_py(dest_host, "os", "system", "echo '%s'
> %s" % (big_line, dest_file))
+
+ return rc
def noBlock(self, *args):
'''Perform a remote execution without waiting for it to finish'''
@@ -195,22 +195,22 @@
If the call fail, lastrc == 1 and return the reason (string)
'''
encode_args = binascii.b2a_base64(pickle.dumps(args))
- encode_cmd =
string.join(["@libdir@/heartbeat/cts/CTSproxy.py",module,func,encode_args])
+ encode_cmd =
string.join(["@libdir@/heartbeat/cts/CTSproxy.py",module,func,encode_args])
- #print "%s: %s.%s %s" % (node, module, func, repr(args))
+ #print "%s: %s.%s %s" % (node, module, func, repr(args))
result = self.readlines(node, encode_cmd)
-
- if result != None:
- result.pop()
-
- if self.lastrc == 0:
- last_line=""
- if result != None:
- array_len = len(result)
- if array_len > 0:
- last_line=result.pop()
- #print "result: %s" % repr(last_line)
- return pickle.loads(binascii.a2b_base64(last_line)), result
+
+ if result != None:
+ result.pop()
+
+ if self.lastrc == 0:
+ last_line=""
+ if result != None:
+ array_len = len(result)
+ if array_len > 0:
+ last_line=result.pop()
+ #print "result: %s" % repr(last_line)
+ return pickle.loads(binascii.a2b_base64(last_line)), result
return -1, result
@@ -271,15 +271,15 @@
We return the first line which matches any of our patterns.
'''
- last_line=None
- first_line=None
+ last_line=None
+ first_line=None
if timeout == None: timeout = self.Timeout
done=time.time()+timeout+1
- if self.debug:
- print "starting search: timeout=%d" % timeout
- for regex in self.regexes:
- print "Looking for regex: ", regex
+ if self.debug:
+ print "starting search: timeout=%d" % timeout
+ for regex in self.regexes:
+ print "Looking for regex: ", regex
while (timeout <= 0 or time.time() <= done):
newsize=os.path.getsize(self.filename)
@@ -301,6 +301,7 @@
for regex in self.regexes:
which=which+1
if self.debug > 3: print "Comparing line to ", regex
+ #matchobj = re.search(string.lower(regex),
string.lower(line))
matchobj = re.search(regex, line)
if matchobj:
self.whichmatch=which
@@ -472,10 +473,10 @@
'''Finish the Initialization process. Prepare to test...'''
for node in self.Env["nodes"]:
- if self.StataCM(node):
- self.ShouldBeStatus[node]=self["up"]
- else:
- self.ShouldBeStatus[node]=self["down"]
+ if self.StataCM(node):
+ self.ShouldBeStatus[node]=self["up"]
+ else:
+ self.ShouldBeStatus[node]=self["down"]
def upcount(self):
'''How many nodes are up?'''
@@ -491,49 +492,50 @@
os.system("cp /dev/null " + self["LogFileName"])
def install_config(self, node):
- return None
+ return None
def StartaCM(self, node):
'''Start up the cluster manager on a given node'''
self.debug("Starting %s on node %s" %(self["Name"], node))
- if not self.ShouldBeStatus.has_key(node):
- self.ShouldBeStatus[node] = self["down"]
+ if not self.ShouldBeStatus.has_key(node):
+ self.ShouldBeStatus[node] = self["down"]
if self.ShouldBeStatus[node] != self["down"]:
- return 1
+ return 1
+ print "Waiting for "+ node
if not self.ns.WaitForNodeToComeUp(node):
self.log("WaitForNodeToComeUp %s failed" % node)
return 0
patterns = []
# Technically we should always be able to notice ourselves starting
- if self.upcount() == 0:
- patterns.append(self["Pat:We_started"] % node)
- else:
- patterns.append(self["Pat:They_started"] % node)
+ if self.upcount() == 0:
+ patterns.append(self["Pat:We_started"] % node)
+ else:
+ patterns.append(self["Pat:They_started"] % node)
watch = LogWatcher(
self["LogFileName"], patterns, timeout=self["StartTime"]+10)
watch.setwatch()
- self.install_config(node)
+ self.install_config(node)
# Clear out the host cache to prevent the PE from shooting nodes
# during StartOnebyOne
-# self.rsh.remote_python_call(
-# node, "os", "system", "rm -f @HA_VARLIBDIR@/heartbeat/hostcache")
+# self.rsh.remote_python_call(
+# node, "os", "system", "rm -f @HA_VARLIBDIR@/heartbeat/hostcache")
if not self.ns.WaitForNodeToComeUp(node):
self.log("Second WaitForNodeToComeUp %s failed" % node)
return 0
- if self.StataCM(node) and self.cluster_stable(self["DeadTime"]):
+ if self.StataCM(node) and self.cluster_stable(self["DeadTime"]):
self.log ("%s was already started" %(node))
- return 1
+ return 1
if self.rsh(node, self["StartCmd"]) != 0:
self.log ("Warn: Start command failed on node %s" %(node))
@@ -547,14 +549,14 @@
self.log ("Warn: Startup pattern not found: %s" %(regex))
if watch_result:
- #self.debug("Found match: "+ repr(watch_result))
- self.cluster_stable(self["DeadTime"])
- return 1
+ #self.debug("Found match: "+ repr(watch_result))
+ self.cluster_stable(self["DeadTime"])
+ return 1
- if self.StataCM(node) and self.cluster_stable(self["DeadTime"]):
- return 1
+ if self.StataCM(node) and self.cluster_stable(self["DeadTime"]):
+ return 1
- self.log ("Warn: Start failed for node %s" %(node))
+ self.log ("Warn: Start failed for node %s" %(node))
return None
def StartaCMnoBlock(self, node):
@@ -578,7 +580,7 @@
self.debug("Stopping %s on node %s" %(self["Name"], node))
if self.ShouldBeStatus[node] != self["up"]:
- return 1
+ return 1
if not self.ns.WaitForNodeToComeUp(node):
self.log("WaitForNodeToComeUp %s filed" % node)
@@ -586,7 +588,7 @@
if self.rsh(node, self["StopCmd"]) == 0:
self.ShouldBeStatus[node]=self["down"]
- self.cluster_stable(self["DeadTime"])
+ self.cluster_stable(self["DeadTime"])
return 1
else:
self.log ("Could not stop %s on node %s" %(self["Name"], node))
@@ -661,15 +663,15 @@
'''Start the cluster manager on every node in the cluster.
We can do it on a subset of the cluster if nodelist is not None.
'''
- ret = 1
+ ret = 1
map = {}
if not nodelist:
nodelist=self.Env["nodes"]
for node in nodelist:
if self.ShouldBeStatus[node] == self["down"]:
if not self.StartaCM(node):
- ret = 0
- return ret
+ ret = 0
+ return ret
def stopall(self, nodelist=None):
@@ -677,15 +679,15 @@
We can do it on a subset of the cluster if nodelist is not None.
'''
- ret = 1
+ ret = 1
map = {}
if not nodelist:
nodelist=self.Env["nodes"]
for node in self.Env["nodes"]:
if self.ShouldBeStatus[node] == self["up"]:
if not self.StopaCM(node):
- ret = 0
- return ret
+ ret = 0
+ return ret
def rereadall(self, nodelist=None):
@@ -885,7 +887,7 @@
self.CM = cm
self.ResourceType = rsctype
self.Instance = instance
- self.needs_quorum = 1
+ self.needs_quorum = 1
def Type(self):
return self.ResourceType
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 29, Issue 101
*********************************************