Author: challngr Date: Fri Jul 19 20:11:30 2013 New Revision: 1504991 URL: http://svn.apache.org/r1504991 Log: UIMA-3081 Updates - bypass Nodepool checking when not starting or checking full set of nodes.
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 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=1504991&r1=1504990&r2=1504991&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc (original) +++ uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc Fri Jul 19 20:11:30 2013 @@ -186,6 +186,12 @@ class CheckDucc(DuccUtil): # read the nodelists if ( len(nodefiles) == 0 ): nodefiles = self.default_nodefiles + check_nodepools = True + else: + # if using other than the fully configured set of nodes we can't reliably check nodepools + # because anything other than the full set of nodes may be missing something + check_nodepools = False + nodes = {} for nf in nodefiles: nodes = self.read_nodefile(nf, nodes) @@ -204,7 +210,7 @@ class CheckDucc(DuccUtil): nodes['local'] = localnodes self.verify_jvm() - if self.verify_class_configuration(nodes): + if self.verify_class_configuration(nodes, check_nodepools): print "OK: Class configuration checked" if ( config_only ): 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=1504991&r1=1504990&r2=1504991&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 Fri Jul 19 20:11:30 2013 @@ -647,19 +647,6 @@ class DuccUtil(DuccBase): print 'NOTOK: Cannot find node defined in pool "' +np+'" in any nodefile:', node nodepools_ok = False - # - # Now make sure that all classes that reference nodepools have corresponding - # nodepool definitions - # - - for ( k, v ) in classprops.items(): - if ( k.startswith('scheduling.class.') and k.endswith('.nodepool') ): - if ( not ( v in nodepools ) ): - toks = k.split('.') - classname = toks[2] - print 'NOTOK: Class', classname, 'references non-existent nodepool', v - nodepools_ok = False - if ( nodepools_ok ): print 'OK: All nodepools are verified' else: @@ -667,7 +654,7 @@ class DuccUtil(DuccBase): return nodepools_ok - def verify_class_configuration(self, allnodes): + def verify_class_configuration(self, allnodes, must_verify_nodepools): answer = True # first, find the class definition classfile = self.ducc_properties.get('ducc.rm.class.definitions') @@ -682,7 +669,7 @@ class DuccUtil(DuccBase): return False # Verify nodepool definitions. - if ( not self.check_nodepools(classprops, allnodes) ): + if ( must_verify_nodepools and (not self.check_nodepools(classprops, allnodes)) ): # this check will emit necessary messages answer = False 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=1504991&r1=1504990&r2=1504991&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/src/main/admin/start_ducc (original) +++ uima/sandbox/uima-ducc/trunk/src/main/admin/start_ducc Fri Jul 19 20:11:30 2013 @@ -262,7 +262,9 @@ class StartDucc(DuccUtil): if ( len(argv) == 0 ): nodefiles = self.default_nodefiles components = self.default_components - + must_verify_nodepools = True + else: + must_verify_nodepools = False # this means all the non-agent processes - conflicts are already checked if ( management ): @@ -292,7 +294,7 @@ class StartDucc(DuccUtil): ok = False if ok and (len(nodefiles) > 0): - if self.verify_class_configuration(nodes): + if self.verify_class_configuration(nodes, must_verify_nodepools): print "OK: Class configuration checked" else: print "NOTOK: Bad configuration, cannot start."