Signed-off-by: Angus Salkeld <asalk...@redhat.com>
---
 cts/corosync.py  |    2 +-
 cts/corotests.py |   13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/cts/corosync.py b/cts/corosync.py
index bcaa796..cded96b 100644
--- a/cts/corosync.py
+++ b/cts/corosync.py
@@ -438,7 +438,7 @@ class TestAgent(object):
         '''Tear down (undo) the given ScenarioComponent'''
         self.env.debug('test agent: stopping %s on node %s' % (self.binary, 
self.node))
         self.sock.close ()
-        self.rsh(self.node, "killall " + self.binary + " 2>/dev/null")
+        self.rsh(self.node, "killall -9 " + self.binary + " 2>/dev/null")
         self.started = False
 
     def kill(self):
diff --git a/cts/corotests.py b/cts/corotests.py
index 8175042..241832e 100644
--- a/cts/corotests.py
+++ b/cts/corotests.py
@@ -33,6 +33,7 @@ Copyright (c) 2010 Red Hat, Inc.
 # THE POSSIBILITY OF SUCH DAMAGE.
 
 import random
+import socket
 from UserDict import UserDict
 from cts.CTStests import *
 from corosync import CpgTestAgent
@@ -405,7 +406,6 @@ class CpgMsgOrderBase(CoroTest):
         ret = CoroTest.setup(self, node)
 
         for n in self.CM.Env["nodes"]:
-            self.total_num_msgs = self.total_num_msgs + self.num_msgs_per_node
             self.CM.cpg_agent[n].clean_start()
             self.CM.cpg_agent[n].cpg_join(self.name)
             self.CM.cpg_agent[n].record_messages()
@@ -420,6 +420,10 @@ class CpgMsgOrderBase(CoroTest):
     def wait_and_validate_order(self):
         msgs = {}
 
+        self.total_num_msgs = 0
+        for n in self.CM.Env["nodes"]:
+            self.total_num_msgs = self.total_num_msgs + self.num_msgs_per_node
+
         for n in self.CM.Env["nodes"]:
             msgs[n] = []
             stopped = False
@@ -427,7 +431,11 @@ class CpgMsgOrderBase(CoroTest):
 
             while len(msgs[n]) < self.total_num_msgs and waited < 360:
 
-                msg = self.CM.cpg_agent[n].read_messages(50)
+                try:
+                    msg = self.CM.cpg_agent[n].read_messages(50)
+                except:
+                    return self.failure('connection to test cpg_agent failed.')
+
                 if not msg == None:
                     msgl = msg.split(";")
 
@@ -878,6 +886,7 @@ class VoteQuorumGoDown(VoteQuorumBase):
     def __call__(self, node):
         self.incr("calls")
 
+        self.victims = []
         pats = []
         pats.append("%s .*VQ notification quorate: 0" % self.listener)
         pats.append("%s .*NQ notification quorate: 0" % self.listener)
-- 
1.7.5

_______________________________________________
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to