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 2016/09/08 13:49:31 UTC
svn commit: r1759825 - in /uima/uima-ducc/trunk/src/main/admin: ducc.py
start_ducc stop_ducc
Author: degenaro
Date: Thu Sep 8 13:49:30 2016
New Revision: 1759825
URL: http://svn.apache.org/viewvc?rev=1759825&view=rev
Log:
UIMA-5060 DUCC Orchestrator (OR) "warm" restart issues
- support -c head for stop_ducc & start_ducc, where head = { or, rm, pm, sm, ws, db, broker }
Modified:
uima/uima-ducc/trunk/src/main/admin/ducc.py
uima/uima-ducc/trunk/src/main/admin/start_ducc
uima/uima-ducc/trunk/src/main/admin/stop_ducc
Modified: uima/uima-ducc/trunk/src/main/admin/ducc.py
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/admin/ducc.py?rev=1759825&r1=1759824&r2=1759825&view=diff
==============================================================================
--- uima/uima-ducc/trunk/src/main/admin/ducc.py (original)
+++ uima/uima-ducc/trunk/src/main/admin/ducc.py Thu Sep 8 13:49:30 2016
@@ -133,7 +133,9 @@ class Ducc(DuccUtil):
if ( component == 'all' ):
component = 'rm,sm,pm,ws,orchestrator'
-
+ if ( component == 'head' ):
+ component = 'rm,sm,pm,ws,orchestrator'
+
complist = component.split(',')
args = None
@@ -287,6 +289,7 @@ class Ducc(DuccUtil):
print ' agent rm sm pm ws orchestrator broker'
print ' -- or --'
print ' all - to start all but the agents'
+ print ' head - to start rm sm pm ws orchestrator'
print ' NOTE -- that agents should be started separately'
print ' -n <numagents> if > 1, multiple agents are started (testing mode)'
print ' -b uses nohup and places the process into the background'
Modified: uima/uima-ducc/trunk/src/main/admin/start_ducc
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/admin/start_ducc?rev=1759825&r1=1759824&r2=1759825&view=diff
==============================================================================
--- uima/uima-ducc/trunk/src/main/admin/start_ducc (original)
+++ uima/uima-ducc/trunk/src/main/admin/start_ducc Thu Sep 8 13:49:30 2016
@@ -193,7 +193,8 @@ class StartDucc(DuccUtil):
print " pm - process manager"
print " sm - services manager"
print " ws - web server"
- print " agent - node agent"
+ print " agent - node agent"
+ print ' head = { or, pm, rm, sm, ws, db, broker }'
print ""
print " --nothreading"
print " Disable multithreaded operation if it would otherwise be used"
@@ -251,7 +252,16 @@ class StartDucc(DuccUtil):
for ( o, a ) in opts:
if o in ( '-c', '--components' ):
- components.append(a)
+ if (a.strip() == 'head'):
+ components.append('or')
+ components.append('pm')
+ components.append('rm')
+ components.append('sm')
+ components.append('ws')
+ components.append('db')
+ components.append('broker')
+ else:
+ components.append(a)
elif o in ( '-n', '--nodelist' ):
nodefiles.append(a)
elif o in ( '--nothreading' ):
Modified: uima/uima-ducc/trunk/src/main/admin/stop_ducc
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/admin/stop_ducc?rev=1759825&r1=1759824&r2=1759825&view=diff
==============================================================================
--- uima/uima-ducc/trunk/src/main/admin/stop_ducc (original)
+++ uima/uima-ducc/trunk/src/main/admin/stop_ducc Thu Sep 8 13:49:30 2016
@@ -141,6 +141,7 @@ class StopDucc(DuccUtil):
print ' rm - resource manager'
print ' sm - services manager'
print ' ws - web server'
+ print ' head = { or, pm, rm, sm, ws, db, broker }'
print ''
print ' -w --wait'
print ' Time to wait for everything to come down, in seconds. Default is 60.'
@@ -189,7 +190,16 @@ class StopDucc(DuccUtil):
for ( o, a ) in opts:
if o in ('-c', '--component', '--components'):
- components.append(a)
+ if (a.strip() == 'head'):
+ components.append('or')
+ components.append('pm')
+ components.append('rm')
+ components.append('sm')
+ components.append('ws')
+ components.append('db')
+ components.append('broker')
+ else:
+ components.append(a)
do_components = True
elif o in ( '-a', '--all' ):
all = True
@@ -299,9 +309,14 @@ class StopDucc(DuccUtil):
if ( quiesce ):
self.quiesce_agents(components, nodes)
else:
+ host = self.localhost.split('.')[0]
for c in components:
- self.stop_component(c, force)
-
+ c = c.strip()
+ if(c in ('or','pm','rm','sm','ws')):
+ c = c+'@'+host
+ if(c in ('db','broker')):
+ time.sleep(2)
+ self.stop_component(c, force)
for (nf, nl) in nodes.items():
for n in nl:
self.stop_agents(n, force)