You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ch...@apache.org on 2013/11/13 18:35:16 UTC
svn commit: r1541631 - in /uima/sandbox/uima-ducc/trunk/src/main/admin:
check_ducc ducc_util.py start_ducc stop_ducc
Author: challngr
Date: Wed Nov 13 17:35:16 2013
New Revision: 1541631
URL: http://svn.apache.org/r1541631
Log:
UIMA-3414 Scripting to remove checks and balances for OR lock file.
Modified:
uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc
uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py
uima/sandbox/uima-ducc/trunk/src/main/admin/start_ducc
uima/sandbox/uima-ducc/trunk/src/main/admin/stop_ducc
Modified: uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc?rev=1541631&r1=1541630&r2=1541631&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc Wed Nov 13 17:35:16 2013
@@ -306,7 +306,6 @@ class CheckDucc(DuccUtil):
if ( self.kill_signal != None ):
self.stop_broker()
- self.remove_orchestrator_lock()
if ( len(self.pids) == 0):
if ( os.path.exists(self.pid_file) ):
Modified: uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py?rev=1541631&r1=1541630&r2=1541631&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py Wed Nov 13 17:35:16 2013
@@ -293,17 +293,6 @@ class DuccUtil(DuccBase):
print tag, 'Clock skew[', skew, '] on', os.uname()[1], ". Remote time is", time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.localtime())
return ok or bypass
- def check_orchestrator_lock(self):
- lock = self.DUCC_HOME + '/state/orchestrator.lock'
- if ( os.path.exists(lock) ):
- print 'NOTOK WARNING The Orchestrator lock file', lock, 'exists. WARNING NOTOK'
- print 'NOTOK WARNING Insure the Orchestrator is not running and clear this lock. WARNING NOTOK'
- print 'NOTOK WARNING When the lock is clear try restarting the Orchestrator coponent. WARNING NOTOK'
- time.sleep(5)
-
- return False
- return True
-
def get_duccling_version(self):
CMD = self.duccling + ' -v >' + self.DUCC_HOME + '/state/duccling.version'
os.system(CMD)
@@ -554,34 +543,6 @@ class DuccUtil(DuccBase):
return answer
-
-
- #def read_nodefile(self, nodefile, nodes):
- #
- # if ( not os.path.exists(nodefile) ):
- # print 'Nodefile', nodefile, 'does not exist or cannot be read.'
- # return None
- #
- # f = open(nodefile)
- # for node in f:
- # node = node.strip()
- # if ( not node ):
- # continue
- # if ( node.startswith('#') ):
- # continue
- # nodes.append(node)
- #
- # return nodes
-
- def remove_orchestrator_lock(self):
- orlock = self.DUCC_HOME + '/state/orchestrator.lock'
- try:
- if ( os.path.exists(orlock) ):
- os.remove(orlock)
- print 'Orchestrator lock removed'
- except:
- print 'Unable to remove orchestrator lock'
-
def kill_process(self, node, proc, signal):
self.ssh(node, False, 'kill', signal, proc[1])
Modified: uima/sandbox/uima-ducc/trunk/src/main/admin/start_ducc
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/start_ducc?rev=1541631&r1=1541630&r2=1541631&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/admin/start_ducc (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/start_ducc Wed Nov 13 17:35:16 2013
@@ -273,9 +273,6 @@ class StartDucc(DuccUtil):
self.verify_required_directories()
- if ( 'or' in components ):
- self.check_orchestrator_lock()
-
if ( not verify_master_node(self.ducc_properties) ):
print 'FAIL: Cannot run javac to run java verification'
return
Modified: uima/sandbox/uima-ducc/trunk/src/main/admin/stop_ducc
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/stop_ducc?rev=1541631&r1=1541630&r2=1541631&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/admin/stop_ducc (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/stop_ducc Wed Nov 13 17:35:16 2013
@@ -70,9 +70,6 @@ class StopDucc(DuccUtil):
print 'Stopping component', com, 'on node', target_node, 'with PID', pid, 'forcibly (kill -9)'
self.nohup(['ssh', target_node, 'kill', '-KILL', pid], False)
- if ( component == 'or' ):
- self.remove_orchestrator_lock()
-
pass
else:
print 'Stopping component', com, 'on node', target_node, 'with PID', pid