ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/SchedulerEdg.py
(Generate patch)

Comparing COMP/CRAB/python/SchedulerEdg.py (file contents):
Revision 1.101 by slacapra, Tue Oct 17 09:52:57 2006 UTC vs.
Revision 1.132 by corvo, Wed Aug 15 13:36:35 2007 UTC

# Line 3 | Line 3 | from crab_logger import Logger
3   from crab_exceptions import *
4   from crab_util import *
5   from EdgConfig import *
6 + from BlackWhiteListParser import BlackWhiteListParser
7   import common
8  
9   import os, sys, time
# Line 22 | Line 23 | class SchedulerEdg(Scheduler):
23  
24      def configure(self, cfg_params):
25  
26 +        # init BlackWhiteListParser
27 +        self.blackWhiteListParser = BlackWhiteListParser(cfg_params)
28 +
29 +        self.proxyValid=0
30 +        try: self.dontCheckProxy=int(cfg_params["EDG.dont_check_proxy"])
31 +        except KeyError: self.dontCheckProxy = 0
32 +
33          try:
34              RB=cfg_params["EDG.rb"]
35              self.rb_param_file=self.rb_configure(RB)
# Line 59 | Line 67 | class SchedulerEdg(Scheduler):
67          try: self.VO = cfg_params['EDG.virtual_organization']
68          except KeyError: self.VO = 'cms'
69  
70 +        try: self.copy_input_data = cfg_params["USER.copy_input_data"]
71 +        except KeyError: self.copy_input_data = 0
72 +
73          try: self.return_data = cfg_params['USER.return_data']
74          except KeyError: self.return_data = 0
75  
# Line 80 | Line 91 | class SchedulerEdg(Scheduler):
91             msg = msg + 'Please modify return_data and copy_data value in your crab.cfg file\n'
92             raise CrabException(msg)
93  
94 +        ########### FEDE FOR DBS2 ##############################
95 +        try:
96 +            self.publish_data = cfg_params["USER.publish_data"]
97 +            self.checkProxy()
98 +            if int(self.publish_data) == 1:
99 +                try:
100 +                    self.publish_data_name = cfg_params['USER.publish_data_name']
101 +                except KeyError:
102 +                    msg = "Error. The [USER] section does not have 'publish_data_name'"
103 +                    raise CrabException(msg)
104 +                try:
105 +                    tmp = runCommand("voms-proxy-info -identity")
106 +                    tmp = string.split(tmp,'/')
107 +                    reCN=re.compile(r'CN=')
108 +                    for t in tmp:
109 +                        if reCN.match(t):
110 +                            self.UserGridName=string.strip((t.replace('CN=','')).replace(' ',''))
111 +                        
112 +                    #self.UserGridName = string.strip(runCommand("voms-proxy-info -identity | awk -F\'CN\' \'{print $2$3$4}\' | tr -d \'=/ \'"))
113 +                except:
114 +                    msg = "Error. Problem with voms-proxy-info -identity command"
115 +                    raise CrabException(msg)
116 +        except KeyError: self.publish_data = 0
117 +
118 +        if ( int(self.copy_data) == 0 and int(self.publish_data) == 1 ):
119 +           msg = 'Warning: publish_data = 1 must be used with copy_data = 1\n'
120 +           msg = msg + 'Please modify copy_data value in your crab.cfg file\n'
121 +           common.logger.message(msg)
122 +           raise CrabException(msg)
123 +        #################################################
124 +
125          try:
126              self.lfc_host = cfg_params['EDG.lfc_host']
127          except KeyError:
# Line 151 | Line 193 | class SchedulerEdg(Scheduler):
193          libPath=os.path.join(path, "lib", "python")
194          sys.path.append(libPath)
195  
154        self.proxyValid=0
155
196          try:
197              self._taskId = cfg_params['taskId']
198          except:
# Line 177 | Line 217 | class SchedulerEdg(Scheduler):
217          self.edg_config_vo = edgConfig.configVO()
218  
219          if (self.edg_config and self.edg_config_vo != ''):
220 <            self.rb_param_file = 'RBconfig = "'+self.edg_config+'";\nRBconfigVO = "'+self.edg_config_vo+'";'
220 >            self.rb_param_file = 'RBconfig = "'+self.edg_config+'";\nRBconfigVO = "'+self.edg_config_vo+'";\n'
221              #print "rb_param_file = ", self.rb_param_file
222          return self.rb_param_file
223        
# Line 212 | Line 252 | class SchedulerEdg(Scheduler):
252              for i in range(len(ce_white_list)):
253                  if i == 0:
254                      if (req == ' '):
255 <                        req = req + '((RegExp("' + ce_white_list[i] + '", other.GlueCEUniqueId))'
255 >                        req = req + '((RegExp("' + string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))'
256                      else:
257 <                        req = req +  ' && ((RegExp("' + ce_white_list[i] + '", other.GlueCEUniqueId))'
257 >                        req = req +  ' && ((RegExp("' +  string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))'
258                      pass
259                  else:
260 <                    req = req +  ' || (RegExp("' + ce_white_list[i] + '", other.GlueCEUniqueId))'
260 >                    req = req +  ' || (RegExp("' +  string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))'
261              req = req + ')'
262          
263          if self.EDG_ce_black_list:
264              ce_black_list = string.split(self.EDG_ce_black_list,',')
265              for ce in ce_black_list:
266                  if (req == ' '):
267 <                    req = req + '(!RegExp("' + ce + '", other.GlueCEUniqueId))'
267 >                    req = req + '(!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))'
268                  else:
269 <                    req = req +  ' && (!RegExp("' + ce + '", other.GlueCEUniqueId))'
269 >                    req = req +  ' && (!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))'
270                  pass
271          if self.EDG_clock_time:
272              if (req == ' '):
# Line 241 | Line 281 | class SchedulerEdg(Scheduler):
281                  req = req + ' && other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time
282                  
283          for i in range(len(first)): # Add loop DS
284 +            groupReq = req
285              self.param='sched_param_'+str(i)+'.clad'
286              param_file = open(common.work_space.shareDir()+'/'+self.param, 'w')
287  
288              itr4=self.findSites_(first[i])
289              for arg in itr4:
290 <                req = req + ' && anyMatch(other.storage.CloseSEs, ('+str(arg)+'))'
291 <            param_file.write('Requirements = '+req +';\n')  
290 >                groupReq = groupReq + ' && anyMatch(other.storage.CloseSEs, ('+str(arg)+'))'
291 >            param_file.write('Requirements = '+groupReq +';\n')  
292    
293              if (self.rb_param_file != ''):
294                  param_file.write(self.rb_param_file)  
# Line 294 | Line 335 | class SchedulerEdg(Scheduler):
335          txt += '    echo "middleware =$middleware" \n'
336          txt += 'elif [ $VO_CMS_SW_DIR ]; then \n'
337          txt += '    middleware=LCG \n'
338 <        txt += '    echo "SyncCE=`edg-brokerinfo getCE`" | tee -a $RUNTIME_AREA/$repo \n'
338 >   #     txt += '    echo "SyncCE=`edg-brokerinfo getCE`" | tee -a $RUNTIME_AREA/$repo \n'
339 >        txt += '    echo "SyncCE=`glite-brokerinfo getCE`" | tee -a $RUNTIME_AREA/$repo \n'
340          txt += '    echo "GridFlavour=`echo $middleware`" | tee -a $RUNTIME_AREA/$repo \n'
341          txt += '    echo "middleware =$middleware" \n'
342          txt += 'else \n'
# Line 316 | Line 358 | class SchedulerEdg(Scheduler):
358          
359          txt += '\n\n'
360  
361 <        if int(self.copy_data) == 1:
362 <           if self.SE:
363 <              txt += 'export SE='+self.SE+'\n'
364 <              txt += 'echo "SE = $SE"\n'
365 <           if self.SE_PATH:
366 <              if ( self.SE_PATH[-1] != '/' ) : self.SE_PATH = self.SE_PATH + '/'
367 <              txt += 'export SE_PATH='+self.SE_PATH+'\n'
368 <              txt += 'echo "SE_PATH = $SE_PATH"\n'
361 > #        if int(self.copy_data) == 1:
362 > #           if self.SE:
363 > #              txt += 'export SE='+self.SE+'\n'
364 > #              txt += 'echo "SE = $SE"\n'
365 > #           if self.SE_PATH:
366 > #              if ( self.SE_PATH[-1] != '/' ) : self.SE_PATH = self.SE_PATH + '/'
367 > #              txt += 'export SE_PATH='+self.SE_PATH+'\n'
368 > #              txt += 'echo "SE_PATH = $SE_PATH"\n'
369  
370          txt += 'export VO='+self.VO+'\n'
371          ### add some line for LFC catalog setting
# Line 367 | Line 409 | class SchedulerEdg(Scheduler):
409                txt += '\n'
410  
411          txt += 'if [ $middleware == LCG ]; then\n'
412 <        txt += '    CloseCEs=`edg-brokerinfo getCE`\n'
412 >    #    txt += '    CloseCEs=`edg-brokerinfo getCE`\n'
413 >        txt += '    CloseCEs=`glite-brokerinfo getCE`\n'
414          txt += '    echo "CloseCEs = $CloseCEs"\n'
415          txt += '    CE=`echo $CloseCEs | sed -e "s/:.*//"`\n'
416          txt += '    echo "CE = $CE"\n'
# Line 393 | Line 436 | class SchedulerEdg(Scheduler):
436          Copy input data from SE to WN    
437          """
438          txt = ''
439 +        if not self.copy_input_data: return txt
440  
441          ## OLI_Daniele deactivate for OSG (wait for LCG UI installed on OSG)
442          txt += 'if [ $middleware == OSG ]; then\n'
# Line 441 | Line 485 | class SchedulerEdg(Scheduler):
485          to copy produced output into a storage element.
486          """
487          txt = ''
488 +
489 +        ##### FEDE MOVED FROM SET_ENVIRONMENT ##############
490 +        
491 +        SE_PATH=''
492          if int(self.copy_data) == 1:
493 +           if self.SE:
494 +              txt += 'export SE='+self.SE+'\n'
495 +              txt += 'echo "SE = $SE"\n'
496 +           if self.SE_PATH:
497 +              if ( self.SE_PATH[-1] != '/' ) : self.SE_PATH = self.SE_PATH + '/'
498 +              SE_PATH=self.SE_PATH
499 +              ####### FEDE FOR DBS2
500 +              if int(self.publish_data) == 1:
501 +                  txt += '### publish_data = 1 so the SE path where to copy the output is: \n'
502 +                  #txt += 'subject=`voms-proxy-info -subject | awk -F\'CN\' \'{print $2$3$4}\' | tr -d \'=/ \'` \n'
503 +                  #txt += 'echo "subject = $subject" \n'
504 +                  #path_add = '${subject}/'+ self.publish_data_name +'_${PSETHASH}/'
505 +                  path_add = self.UserGridName + '/' + self.publish_data_name +'_${PSETHASH}/'
506 +                  SE_PATH = SE_PATH + path_add
507 +
508 +              txt += 'export SE_PATH='+SE_PATH+'\n'
509 +              txt += 'echo "SE_PATH = $SE_PATH"\n'
510 +
511 +        ##########################################################  
512 +
513 +        #if int(self.copy_data) == 1:
514             txt += '#\n'
515             txt += '#   Copy output to SE = $SE\n'
516             txt += '#\n'
# Line 455 | Line 524 | class SchedulerEdg(Scheduler):
524  
525             txt += '    for out_file in $file_list ; do\n'
526             txt += '        echo "Trying to copy output file to $SE using srmcp"\n'
527 <           txt += '        echo "mkdir -p $HOME/.srmconfig"\n'
528 <           txt += '        mkdir -p $HOME/.srmconfig\n'
527 >           # txt += '        echo "mkdir -p $HOME/.srmconfig"\n'
528 >           # txt += '        mkdir -p $HOME/.srmconfig\n'
529             txt += '        if [ $middleware == LCG ]; then\n'
530 <           txt += '           echo "srmcp -retry_num 3 -retry_timeout 480000 file:////`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
531 <           txt += '           exitstring=`srmcp -retry_num 3 -retry_timeout 480000 file:////\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
530 >           txt += '           echo "srmcp -retry_num 3 -retry_timeout 480000 file:///`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
531 >           txt += '           exitstring=`srmcp -retry_num 3 -retry_timeout 480000 file:///\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
532             txt += '        elif [ $middleware == OSG ]; then\n'
533 <           txt += '           echo "srmcp -retry_num 3 -retry_timeout 240000 -x509_user_trusted_certificates $X509_CERT_DIR file:////`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
534 <           txt += '           exitstring=`srmcp -retry_num 3 -retry_timeout 240000 -x509_user_trusted_certificates $X509_CERT_DIR file:////\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
533 >           txt += '           echo "srmcp -retry_num 3 -retry_timeout 240000 -x509_user_trusted_certificates $X509_CERT_DIR file:///`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
534 >           txt += '           exitstring=`srmcp -retry_num 3 -retry_timeout 240000 -x509_user_trusted_certificates $X509_CERT_DIR file:///\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
535             txt += '        fi \n'
536             txt += '        copy_exit_status=$?\n'
537             txt += '        echo "COPY_EXIT_STATUS for srmcp = $copy_exit_status"\n'
# Line 474 | Line 543 | class SchedulerEdg(Scheduler):
543             txt += '            echo "StageOutExitStatusReason = $exitstring" | tee -a $RUNTIME_AREA/$repo\n'
544             txt += '            echo "srmcp failed, attempting lcg-cp."\n'
545             if common.logger.debugLevel() >= 5:
546 +               ########### FEDE CHANGES TO WRITE IN SRM LNL.INFN.IT #################
547                 txt += '            echo "lcg-cp --vo $VO -t 2400 --verbose file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n'
548                 txt += '            exitstring=`lcg-cp --vo $VO -t 2400 --verbose file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n'
549 +               #txt += '            echo "lcg-cp --vo $VO -t 2400 --verbose file://`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
550 +               #txt += '            exitstring=`lcg-cp --vo $VO -t 2400 --verbose file://\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
551             else:              
552                 txt += '            echo "lcg-cp --vo $VO -t 2400 file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n'
553                 txt += '            exitstring=`lcg-cp --vo $VO -t 2400 file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n'
554 +               #txt += '            echo "lcg-cp --vo $VO -t 2400 file://`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
555 +               #txt += '            exitstring=`lcg-cp --vo $VO -t 2400 file://\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
556             txt += '            copy_exit_status=$?\n'
557             txt += '            echo "COPY_EXIT_STATUS for lcg-cp = $copy_exit_status"\n'
558             txt += '            echo "STAGE_OUT = $copy_exit_status"\n'
# Line 488 | Line 562 | class SchedulerEdg(Scheduler):
562             txt += '               echo "StageOutExitStatus = 198" | tee -a $RUNTIME_AREA/$repo\n'
563             txt += '               echo "StageOutExitStatusReason = $exitstring" | tee -a $RUNTIME_AREA/$repo\n'
564             txt += '               echo "srmcp and lcg-cp and failed!"\n'
565 +           txt += '               SE=""\n'
566 +           txt += '               echo "SE = $SE"\n'
567 +           txt += '               SE_PATH=""\n'
568 +           txt += '               echo "SE_PATH = $SE_PATH"\n'
569             txt += '            else\n'
570             txt += '               echo "StageOutSE = $SE" | tee -a $RUNTIME_AREA/$repo\n'
571             txt += '               echo "StageOutCatalog = " | tee -a $RUNTIME_AREA/$repo\n'
# Line 503 | Line 581 | class SchedulerEdg(Scheduler):
581             txt += '            echo "srmcp succeeded"\n'
582             txt += '         fi\n'
583             txt += '     done\n'
584 +           txt += '     exit_status=$copy_exit_status\n'
585          return txt
586  
587      def wsRegisterOutput(self):
# Line 548 | Line 627 | class SchedulerEdg(Scheduler):
627             txt += '      done\n'
628             txt += '   else \n'
629             txt += '      echo "Trying to copy output file to CloseSE"\n'
630 <           txt += '      CLOSE_SE=`edg-brokerinfo getCloseSEs | head -1`\n'
630 > #          txt += '      CLOSE_SE=`edg-brokerinfo getCloseSEs | head -1`\n'
631 >           txt += '      CLOSE_SE=`glite-brokerinfo getCloseSEs | head -1`\n'
632             txt += '      for out_file in $file_list ; do\n'
633             txt += '         echo "lcg-cr -v -l lfn:${LFN}/$out_file -d $CLOSE_SE -P $LFN/$out_file --vo $VO file://$RUNTIME_AREA/$out_file 2>&1" \n'
634             txt += '         lcg-cr -v -l lfn:${LFN}/$out_file -d $CLOSE_SE -P $LFN/$out_file --vo $VO file://$RUNTIME_AREA/$out_file 2>&1 \n'
# Line 575 | Line 655 | class SchedulerEdg(Scheduler):
655          """
656          self.checkProxy()
657          cmd = 'edg-job-get-logging-info -v 2 ' + id
578        #cmd_out = os.popen(cmd)
658          cmd_out = runCommand(cmd)
659          return cmd_out
660  
582    def getExitStatus(self, id):
583        return self.getStatusAttribute_(id, 'exit_code')
584
585    def queryStatus(self, id):
586        return self.getStatusAttribute_(id, 'status')
587
588    def queryDest(self, id):  
589        return self.getStatusAttribute_(id, 'destination')
590
591
592    def getStatusAttribute_(self, id, attr):
593        """ Query a status of the job with id """
594
595        self.checkProxy()
596        hstates = {}
597        Status = importName('edg_wl_userinterface_common_LbWrapper', 'Status')
598        # Bypass edg-job-status interfacing directly to C++ API
599        # Job attribute vector to retrieve status without edg-job-status
600        level = 0
601        # Instance of the Status class provided by LB API
602        jobStat = Status()
603        st = 0
604        #print id, level, attr, self.states.index(attr)
605        jobStat.getStatus(id, level)
606        #print jobStat.loadStatus(st)
607        err, apiMsg = jobStat.get_error()
608        if err:
609            common.logger.debug(5,'Error caught' + apiMsg)
610            return None
611        else:
612            for i in range(len(self.states)):
613                # Fill an hash table with all information retrieved from LB API
614                hstates[ self.states[i] ] = jobStat.loadStatus(st)[i]
615                #print i, jobStat.loadStatus(st)[i]
616            result = jobStat.loadStatus(st)[self.states.index(attr)]
617            #print str(result)
618            return result
619
661      def queryDetailedStatus(self, id):
662          """ Query a detailed status of the job with id """
663          cmd = 'edg-job-status '+id
664          cmd_out = runCommand(cmd)
665          return cmd_out
666  
626    ##### FEDE ######        
667      def findSites_(self, n):
668          itr4 =[]
669 +
670          sites = common.jobDB.destination(n)
671 <        if len(sites)>0 and sites[0]=="Any":
671 >
672 >        if len(sites)>0 and sites[0]=="":
673              return itr4
674 +
675          itr = ''
676          if sites != [""]:#CarlosDaniele
677 <            for site in sites:
677 >            ##Addedd Daniele
678 >            replicas = self.blackWhiteListParser.checkBlackList(sites,n)
679 >            if len(replicas)!=0:
680 >                replicas = self.blackWhiteListParser.checkWhiteList(replicas,n)
681 >              
682 >            if len(replicas)==0:
683 >                msg = 'No sites remaining that host any part of the requested data! Exiting... '
684 >                raise CrabException(msg)
685 >            #####        
686 >           # for site in sites:
687 >            for site in replicas:
688                  #itr = itr + 'target.GlueSEUniqueID==&quot;'+site+'&quot; || '
689                  itr = itr + 'target.GlueSEUniqueID=="'+site+'" || '
690              itr = itr[0:-4]
# Line 639 | Line 692 | class SchedulerEdg(Scheduler):
692          return itr4
693  
694      def createXMLSchScript(self, nj, argsList):
642   # def createXMLSchScript(self, nj):
695        
696          """
697          Create a XML-file for BOSS4.
# Line 655 | Line 707 | class SchedulerEdg(Scheduler):
707          jbt = job.type()
708          
709          inp_sandbox = jbt.inputSandbox(index)
710 <        out_sandbox = jbt.outputSandbox(index)
710 >        #out_sandbox = jbt.outputSandbox(index)
711          """
712          [end] FIX-ME
713          """
# Line 671 | Line 723 | class SchedulerEdg(Scheduler):
723          dir = string.split(common.work_space.topDir(), '/')
724          taskName = dir[len(dir)-2]
725    
674        to_writeReq = ''
726          to_write = ''
727  
728          req=' '
# Line 726 | Line 777 | class SchedulerEdg(Scheduler):
777          to_write = to_write + 'MyProxyServer = "&quot;' + self.proxyServer + '&quot;"\n'
778          to_write = to_write + 'VirtualOrganisation = "&quot;' + self.VO + '&quot;"\n'
779  
780 <                #TaskName  
780 >        #TaskName  
781          dir = string.split(common.work_space.topDir(), '/')
782          taskName = dir[len(dir)-2]
783  
784          xml.write(str(title))
785 <        xml.write('<task name="' +str(taskName)+'">\n')
785 >        #xml.write('<task name="' +str(taskName)+'" sub_path="' +common.work_space.pathForTgz() + 'share/.boss_cache">\n')
786 >
787 >        #xml.write('<task name="' +str(taskName)+ '" sub_path="' +common.work_space.pathForTgz() + 'share/.boss_cache"' + '" task_info="' + os.path.expandvars('X509_USER_PROXY') + '">\n')
788 >        xml.write('<task name="' +str(taskName)+ '" sub_path="' +common.work_space.pathForTgz() + 'share/.boss_cache"' + ' task_info="' + os.environ["X509_USER_PROXY"] + '">\n')
789          xml.write(jt_string)
790          
791          if (to_write != ''):
# Line 758 | Line 812 | class SchedulerEdg(Scheduler):
812          indy: here itr4
813          '''
814          
815 <
816 <        xml.write('<chain scheduler="'+str(self.schedulerName)+'">\n')
815 >        xml.write('<chain name="' +str(taskName)+'__ITR1_" scheduler="'+str(self.schedulerName)+'">\n')
816 >       # xml.write('<chain scheduler="'+str(self.schedulerName)+'">\n')
817          xml.write(jt_string)
818  
819          #executable
# Line 772 | Line 826 | class SchedulerEdg(Scheduler):
826          xml.write('<program>\n')
827          xml.write('<exec> ' + os.path.basename(script) +' </exec>\n')
828          xml.write(jt_string)
829 <    
829 >
830          xml.write('<args> <![CDATA[\n _ITR2_ \n]]> </args>\n')
831          xml.write('<program_types> crabjob </program_types>\n')
832 <        inp_box = script + ','
832 >        inp_box = common.work_space.pathForTgz() + 'job/' + jbt.scriptName + ','
833  
834          if inp_sandbox != None:
835              for fl in inp_sandbox:
# Line 783 | Line 837 | class SchedulerEdg(Scheduler):
837                  pass
838              pass
839  
840 <        inp_box = inp_box + os.path.abspath(os.environ['CRABDIR']+'/python/'+'report.py') + ',' +\
841 <                  os.path.abspath(os.environ['CRABDIR']+'/python/'+'DashboardAPI.py') + ','+\
842 <                  os.path.abspath(os.environ['CRABDIR']+'/python/'+'Logger.py') + ','+\
843 <                  os.path.abspath(os.environ['CRABDIR']+'/python/'+'ProcInfo.py') + ','+\
844 <                  os.path.abspath(os.environ['CRABDIR']+'/python/'+'apmon.py') + ','+\
845 <                  os.path.abspath(os.environ['CRABDIR']+'/python/'+'parseCrabFjr.py')
792 <
793 <        if (not jbt.additional_inbox_files == []):
794 <            inp_box = inp_box + ','
795 <            for addFile in jbt.additional_inbox_files:
796 <                addFile = os.path.abspath(addFile)
797 <                inp_box = inp_box+''+addFile+','
798 <                pass
840 > #        if (not jbt.additional_inbox_files == []):
841 > #            inp_box = inp_box + ','
842 > #            for addFile in jbt.additional_inbox_files:
843 > #                #addFile = os.path.abspath(addFile)
844 > #                inp_box = inp_box+''+addFile+','
845 > #                pass
846  
847          if inp_box[-1] == ',' : inp_box = inp_box[:-1]
848          inp_box = '<infiles> <![CDATA[\n' + inp_box + '\n]]> </infiles>\n'
# Line 826 | Line 873 | class SchedulerEdg(Scheduler):
873          INDY
874          something similar should be also done for infiles (if it makes sense!)
875          """
876 +        # Stuff to be returned _always_ via sandbox
877 +        for fl in jbt.output_file_sandbox:
878 +            out_box = out_box + '' + jbt.numberFile_(fl, '_ITR1_') + ','
879 +            pass
880 +        pass
881 +
882 +        # via sandbox iif required return_data
883          if int(self.return_data) == 1:
884              for fl in jbt.output_file:
885                  out_box = out_box + '' + jbt.numberFile_(fl, '_ITR1_') + ','
# Line 854 | Line 908 | class SchedulerEdg(Scheduler):
908          Function to check the Globus proxy.
909          """
910          if (self.proxyValid): return
911 <        timeleft = -999
911 >
912 >        ### Just return if asked to do so
913 >        if (self.dontCheckProxy==1):
914 >            self.proxyValid=1
915 >            return
916 >
917          minTimeLeft=10*3600 # in seconds
918  
919          minTimeLeftServer = 100 # in hours
# Line 903 | Line 962 | class SchedulerEdg(Scheduler):
962              reTime = re.compile( r'timeleft: (\d+)' )
963              #print "<"+str(reTime.search( cmd_out ).group(1))+">"
964              if reTime.match( cmd_out ):
965 <                time = reTime.search( line ).group(1)
965 >                time = reTime.search( cmd_out ).group(1)
966                  if time < minTimeLeftServer:
967                      renewProxy = 1
968                      common.logger.message('No credential delegation will expire in '+time+' hours: renew it')
# Line 929 | Line 988 | class SchedulerEdg(Scheduler):
988          if self.edg_config_vo:
989              edg_ui_cfg_opt += ' --config-vo ' + self.edg_config_vo + ' '
990          return edg_ui_cfg_opt
991 +
992 +    def submitTout(self, list):
993 +        return 120
994 +
995 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines