Permalink
Browse files

working to reenable system tests

  • Loading branch information...
1 parent 593d733 commit 32bce4906eb590b1502c08a058eac493d2406bc2 Romain Slootmaekers committed May 26, 2011
Showing with 17 additions and 11 deletions.
  1. +1 −1 buildInSandbox.sh
  2. +11 −5 extension/server/ArakoonManagement.py
  3. +5 −5 extension/server/ArakoonRemoteControl.py
View
@@ -2,7 +2,7 @@
set -e
-ocamlbuild $@ arakoon.native
+ocamlbuild $@ -use-ocamlfind arakoon.native
mkdir -p /opt/qbase3/apps/arakoon/bin/
cp arakoon.native /opt/qbase3/apps/arakoon/bin/arakoon
@@ -344,7 +344,7 @@ def _set(s,a,v):
self.__validateName(name)
if not name in nodes:
- raise Exception("No node with name %s configured in cluster %s" % (name,self._clusterId))
+ raise Exception("No node with name %s configured in cluster %s" % (name,self._clusterId) )
_set(g,m,name)
if preferred:
_set(g,pm,'true')
@@ -544,7 +544,7 @@ def removeLocalNode(self, name):
node_str = ','.join(nodes)
config.setParam("global","cluster", node_str)
config.write()
-
+
def listLocalNodes(self):
"""
Get a list of the local nodes in the supplied cluster
@@ -741,7 +741,7 @@ def remoteCollapse(self, nodeName, n):
"""
Tell the targetted node to collapse n tlog files
@type nodeName: string
- @type n: int > 0
+ @type n: int
"""
config = self.getNodeConfig(nodeName)
ip = config['ip']
@@ -806,12 +806,18 @@ def _stopOne(self, name):
while(self._getStatusOne(name) == q.enumerators.AppStatusType.RUNNING):
time.sleep(1)
i += 1
+ logging.debug("'%s' is still running... waiting" % name)
+ q.logger.log("'%s' is still running... waiting" % name, level = 3)
if i == 10:
- logging.debug("stopping '%s' with -9")
+ logging.debug("stopping '%s' with kill -9" % name)
+ q.logger.log("stopping '%s' with kill -9" % name, level = 3)
subprocess.call(['pkill', '-9', '-fx', line], close_fds=True)
cnt = 0
- while (self._getStatusOne(name, cluster = cluster) == q.enumerators.AppStatusType.RUNNING ) :
+ while (self._getStatusOne(name) == q.enumerators.AppStatusType.RUNNING ) :
+ logging.debug("'%s' is STILL running... waiting" % name)
+ q.logger.log("'%s' is STILL running... waiting" % name,
+ level = 3)
time.sleep(1)
cnt += 1
if( cnt > 10):
@@ -80,17 +80,17 @@ def collapse(ip, port, clusterId, n):
"""
tell the node listening on (ip, port) to collapse, and keep n tlog files
@type ip: string
- @type port: int > 0
- @type n: int
+ @type port: int
+ @type n: int > 0
@type clusterId:string
@param clusterId: must match cluster id of the node
"""
- if n < 1:
- raise ValueError("n < 1 is not acceptible")
-
+ if n < 1:
+ raise ValueError("%i is not acceptable" % n)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sa = (ip, port)
s.connect(sa)
+
try:
_prologue(clusterId, s)
cmd = _int_to(_COLLAPSE_TLOGS | _MAGIC)

0 comments on commit 32bce49

Please sign in to comment.