You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2018/04/19 13:39:34 UTC
svn commit: r1829539 - in
/uima/uima-ducc/branches/reliable-ducc/src/main/admin: start_ducc stop_ducc
Author: degenaro
Date: Thu Apr 19 13:39:34 2018
New Revision: 1829539
URL: http://svn.apache.org/viewvc?rev=1829539&view=rev
Log:
UIMA-5742 Reliable DUCC
- do not start/stop/quiesce agents from backup head node
Modified:
uima/uima-ducc/branches/reliable-ducc/src/main/admin/start_ducc
uima/uima-ducc/branches/reliable-ducc/src/main/admin/stop_ducc
Modified: uima/uima-ducc/branches/reliable-ducc/src/main/admin/start_ducc
URL: http://svn.apache.org/viewvc/uima/uima-ducc/branches/reliable-ducc/src/main/admin/start_ducc?rev=1829539&r1=1829538&r2=1829539&view=diff
==============================================================================
--- uima/uima-ducc/branches/reliable-ducc/src/main/admin/start_ducc (original)
+++ uima/uima-ducc/branches/reliable-ducc/src/main/admin/start_ducc Thu Apr 19 13:39:34 2018
@@ -362,8 +362,7 @@ class StartDucc(DuccUtil):
sys.exit(1)
ducc = Ducc()
-
- print "Starting", n_nodes, "agents"
+
self.threadpool = ThreadPool(n_nodes + 5) # a few more for the head processes
self.pidlock = threading.Lock()
@@ -381,7 +380,10 @@ class StartDucc(DuccUtil):
# give 'or' a small head start
time.sleep(2)
- if(not self.is_reliable_backup()):
+ if(self.is_reliable_backup()):
+ print '********** "backup" head node -> not starting agents'
+ else:
+ print "Starting", n_nodes, "agents"
for (nodefile, nodelist) in nodes.items():
print '********** Starting agents from file', nodefile
try:
Modified: uima/uima-ducc/branches/reliable-ducc/src/main/admin/stop_ducc
URL: http://svn.apache.org/viewvc/uima/uima-ducc/branches/reliable-ducc/src/main/admin/stop_ducc?rev=1829539&r1=1829538&r2=1829539&view=diff
==============================================================================
--- uima/uima-ducc/branches/reliable-ducc/src/main/admin/stop_ducc (original)
+++ uima/uima-ducc/branches/reliable-ducc/src/main/admin/stop_ducc Thu Apr 19 13:39:34 2018
@@ -101,7 +101,6 @@ class StopDucc(DuccUtil):
self.pids_daemons.delete(com)
self.pids_daemons.delete(component)
-
def quiesce_agents(self, components, nodes):
allnodes = []
for ( nf, nl ) in nodes.items():
@@ -124,9 +123,8 @@ class StopDucc(DuccUtil):
# NOTE: quiesce does not actually cause agents to terminate so we don't update the PIDs file
return
- def stop_agents(self, node, force):
- if(not self.is_reliable_backup()):
- self.stop_component('agent@' + node.strip(), force)
+ def stop_agent(self, node, force):
+ self.stop_component('agent@' + node.strip(), force)
def usage(self, msg):
if ( msg != None ):
@@ -337,11 +335,17 @@ class StopDucc(DuccUtil):
sys.exit(1)
if ( quiesce ):
- self.quiesce_agents(components, nodes)
+ if(self.is_reliable_backup()):
+ print '********** "backup" head node -> not quiescing agents'
+ else:
+ self.quiesce_agents(components, nodes)
else:
- for (nf, nl) in nodes.items():
- for n in nl:
- self.stop_agents(n, force)
+ if(self.is_reliable_backup()):
+ print '********** "backup" head node -> not stopping agents'
+ else:
+ for (nf, nl) in nodes.items():
+ for n in nl:
+ self.stop_agent(n, force)
host = self.localhost.split('.')[0]
for c in components:
c = c.strip()