Signed-off-by: Angus Salkeld <[email protected]>
---
cts/corosync.py | 16 +++++++++++-----
cts/corotests.py | 7 ++++---
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/cts/corosync.py b/cts/corosync.py
index 79f4470..8432373 100644
--- a/cts/corosync.py
+++ b/cts/corosync.py
@@ -449,7 +449,7 @@ class TestAgent(object):
try:
sent = self.sock.send (real_msg)
except socket.error, msg:
- print msg
+ self.env.debug("send(%s): %s; error: %s" % (self.node, real_msg,
msg))
if sent == 0:
raise RuntimeError ("socket connection broken")
@@ -468,7 +468,14 @@ class TestAgent(object):
def send_recv_dynamic (self, *args):
self.send_dynamic (args)
- return self.read()
+
+ try:
+ res = self.read ()
+ except RuntimeError, msg:
+ self.env.debug("send_recv_dynamic: %s; error: %s" %
(str(real_msg), msg))
+
+ return res
+
def send_dynamic (self, *args):
if not self.started:
@@ -480,12 +487,11 @@ class TestAgent(object):
a_str = str(a)
real_msg += ":" + str (len (a_str)) + ":" + a_str
real_msg += ";"
- #print "CLIENT:" + real_msg
sent = 0
try:
sent = self.sock.send (real_msg)
except socket.error, msg:
- print msg
+ self.env.debug("send_dynamic(%s): %s; error: %s" % (self.node,
real_msg, msg))
if sent == 0:
raise RuntimeError ("socket connection broken")
@@ -539,7 +545,7 @@ class CpgTestAgent(TestAgent):
self.cpg_finalize()
except RuntimeError, msg:
# if cpg_agent is down, we are not going to stress
- print msg
+ self.env.debug("CpgTestAgent::cpg_finalize() - %s" % msg)
TestAgent.stop(self)
diff --git a/cts/corotests.py b/cts/corotests.py
index a3d0dc7..a16828c 100644
--- a/cts/corotests.py
+++ b/cts/corotests.py
@@ -76,6 +76,9 @@ class CoroTest(CTSTest):
if self.need_all_up and not self.CM.StataCM(n):
self.incr("started")
self.start(n)
+ if self.need_all_up and self.CM.start_cpg:
+ self.CM.cpg_agent[n].clean_start()
+ self.CM.cpg_agent[n].cpg_join(self.name)
if not self.need_all_up and self.CM.StataCM(n):
self.incr("stopped")
self.stop(n)
@@ -93,6 +96,7 @@ class CpgContextTest(CoroTest):
def __init__(self, cm):
CoroTest.__init__(self, cm)
self.name="CpgContextTest"
+ self.CM.start_cpg = True
def __call__(self, node):
self.incr("calls")
@@ -119,9 +123,6 @@ class CpgConfigChangeBase(CoroTest):
self.listener = None
self.wobbly = None
for n in self.CM.Env["nodes"]:
- if self.CM.start_cpg:
- self.CM.cpg_agent[n].clean_start()
- self.CM.cpg_agent[n].cpg_join(self.name)
if self.wobbly is None:
self.wobbly = n
elif self.listener is None:
--
1.6.6.1
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais