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.106.2.1 by slacapra, Wed Dec 6 10:33:05 2006 UTC vs.
Revision 1.137 by spiga, Tue Sep 18 15:17:55 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 18 | Line 19 | class SchedulerEdg(Scheduler):
19                        "owner","parent_job", "reason","resubmitted","rsl","seed",\
20                        "stateEnterTime","stateEnterTimes","subjob_failed", \
21                        "user tags" , "status" , "status_code","hierarchy"]
21        
22          return
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 84 | 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 155 | Line 193 | class SchedulerEdg(Scheduler):
193          libPath=os.path.join(path, "lib", "python")
194          sys.path.append(libPath)
195  
158        self.proxyValid=0
159
196          try:
197              self._taskId = cfg_params['taskId']
198          except:
# Line 168 | Line 204 | class SchedulerEdg(Scheduler):
204          try: self.schedulerName = cfg_params['CRAB.scheduler']
205          except KeyError: self.scheduler = ''
206  
171        try: self.dontCheckProxy=cfg_params["EDG.dont_check_proxy"]
172        except KeyError: self.dontCheckProxy = 0
173
207          return
208      
209  
# Line 184 | 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 302 | 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 324 | 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 375 | 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 449 | Line 484 | class SchedulerEdg(Scheduler):
484          Write a CopyResults part of a job script, e.g.
485          to copy produced output into a storage element.
486          """
487 <        txt = ''
453 <        if int(self.copy_data) == 1:
454 <           txt += '#\n'
455 <           txt += '#   Copy output to SE = $SE\n'
456 <           txt += '#\n'
457 <           txt += '    if [ $middleware == OSG ]; then\n'
458 <           txt += '        echo "X509_USER_PROXY = $X509_USER_PROXY"\n'
459 <           txt += '        echo "source $OSG_APP/glite/setup_glite_ui.sh"\n'
460 <           txt += '        source $OSG_APP/glite/setup_glite_ui.sh\n'
461 <           txt += '        export X509_CERT_DIR=$OSG_APP/glite/etc/grid-security/certificates\n'
462 <           txt += '        echo "export X509_CERT_DIR=$X509_CERT_DIR"\n'
463 <           txt += '    fi \n'
464 <
465 <           txt += '    for out_file in $file_list ; do\n'
466 <           txt += '        echo "Trying to copy output file to $SE using srmcp"\n'
467 <           txt += '        echo "mkdir -p $HOME/.srmconfig"\n'
468 <           txt += '        mkdir -p $HOME/.srmconfig\n'
469 <           txt += '        if [ $middleware == LCG ]; then\n'
470 <           txt += '           echo "srmcp -retry_num 3 -retry_timeout 480000 file:////`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
471 <           txt += '           exitstring=`srmcp -retry_num 3 -retry_timeout 480000 file:////\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
472 <           txt += '        elif [ $middleware == OSG ]; then\n'
473 <           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'
474 <           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'
475 <           txt += '        fi \n'
476 <           txt += '        copy_exit_status=$?\n'
477 <           txt += '        echo "COPY_EXIT_STATUS for srmcp = $copy_exit_status"\n'
478 <           txt += '        echo "STAGE_OUT = $copy_exit_status"\n'
479 <
480 <           txt += '        if [ $copy_exit_status -ne 0 ]; then\n'
481 <           txt += '            echo "Possible problem with SE = $SE"\n'
482 <           txt += '            echo "StageOutExitStatus = 198" | tee -a $RUNTIME_AREA/$repo\n'
483 <           txt += '            echo "StageOutExitStatusReason = $exitstring" | tee -a $RUNTIME_AREA/$repo\n'
484 <           txt += '            echo "srmcp failed, attempting lcg-cp."\n'
485 <           if common.logger.debugLevel() >= 5:
486 <               txt += '            echo "lcg-cp --vo $VO -t 2400 --verbose file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n'
487 <               txt += '            exitstring=`lcg-cp --vo $VO -t 2400 --verbose file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n'
488 <           else:              
489 <               txt += '            echo "lcg-cp --vo $VO -t 2400 file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n'
490 <               txt += '            exitstring=`lcg-cp --vo $VO -t 2400 file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n'
491 <           txt += '            copy_exit_status=$?\n'
492 <           txt += '            echo "COPY_EXIT_STATUS for lcg-cp = $copy_exit_status"\n'
493 <           txt += '            echo "STAGE_OUT = $copy_exit_status"\n'
494 <
495 <           txt += '            if [ $copy_exit_status -ne 0 ]; then\n'
496 <           txt += '               echo "Problems with SE = $SE"\n'
497 <           txt += '               echo "StageOutExitStatus = 198" | tee -a $RUNTIME_AREA/$repo\n'
498 <           txt += '               echo "StageOutExitStatusReason = $exitstring" | tee -a $RUNTIME_AREA/$repo\n'
499 <           txt += '               echo "srmcp and lcg-cp and failed!"\n'
500 <           txt += '            else\n'
501 <           txt += '               echo "StageOutSE = $SE" | tee -a $RUNTIME_AREA/$repo\n'
502 <           txt += '               echo "StageOutCatalog = " | tee -a $RUNTIME_AREA/$repo\n'
503 <           txt += '               echo "output copied into $SE/$SE_PATH directory"\n'
504 <           txt += '               echo "StageOutExitStatus = 0" | tee -a $RUNTIME_AREA/$repo\n'
505 <           txt += '               echo "lcg-cp succeeded"\n'
506 <           txt += '            fi\n'
507 <           txt += '        else\n'
508 <           txt += '            echo "StageOutSE = $SE" | tee -a $RUNTIME_AREA/$repo\n'
509 <           txt += '            echo "StageOutCatalog = " | tee -a $RUNTIME_AREA/$repo\n'
510 <           txt += '            echo "output copied into $SE/$SE_PATH directory"\n'
511 <           txt += '            echo "StageOutExitStatus = 0" | tee -a $RUNTIME_AREA/$repo\n'
512 <           txt += '            echo "srmcp succeeded"\n'
513 <           txt += '         fi\n'
514 <           txt += '     done\n'
515 <        return txt
487 >        txt = '\n'
488  
489 <    def wsRegisterOutput(self):
490 <        """
491 <        Returns part of a job script which does scheduler-specific work.
520 <        """
489 >        txt += '#\n'
490 >        txt += '# COPY OUTPUT FILE TO SE\n'
491 >        txt += '#\n\n'
492  
493 <        txt = ''
494 <        if int(self.register_data) == 1:
495 <        ## OLI_Daniele deactivate for OSG (wait for LCG UI installed on OSG)
496 <           txt += 'if [ $middleware == OSG ]; then\n'
497 <           txt += '   #\n'
498 <           txt += '   #   Register output to LFC deactivated in OSG mode\n'
499 <           txt += '   #\n'
500 <           txt += '   echo "Register output to LFC deactivated in OSG mode"\n'
501 <           txt += 'elif [ $middleware == LCG ]; then \n'
502 <           txt += '#\n'
503 <           txt += '#  Register output to LFC\n'
504 <           txt += '#\n'
505 <           txt += '   if [ $copy_exit_status -eq 0 ]; then\n'
506 <           txt += '      for out_file in $file_list ; do\n'
507 <           txt += '         echo "Trying to register the output file into LFC"\n'
508 <           txt += '         echo "lcg-rf -l $LFN/$out_file --vo $VO -t 1200 sfn://$SE$SE_PATH/$out_file 2>&1"\n'
509 <           txt += '         lcg-rf -l $LFN/$out_file --vo $VO -t 1200 sfn://$SE$SE_PATH/$out_file 2>&1 \n'
510 <           txt += '         register_exit_status=$?\n'
511 <           txt += '         echo "REGISTER_EXIT_STATUS = $register_exit_status"\n'
512 <           txt += '         echo "STAGE_OUT = $register_exit_status"\n'
513 <           txt += '         if [ $register_exit_status -ne 0 ]; then \n'
514 <           txt += '            echo "Problems with the registration to LFC" \n'
515 <           txt += '            echo "Try with srm protocol" \n'
516 <           txt += '            echo "lcg-rf -l $LFN/$out_file --vo $VO -t 1200 srm://$SE$SE_PATH/$out_file 2>&1"\n'
517 <           txt += '            lcg-rf -l $LFN/$out_file --vo $VO -t 1200 srm://$SE$SE_PATH/$out_file 2>&1 \n'
518 <           txt += '            register_exit_status=$?\n'
519 <           txt += '            echo "REGISTER_EXIT_STATUS = $register_exit_status"\n'
520 <           txt += '            echo "STAGE_OUT = $register_exit_status"\n'
521 <           txt += '            if [ $register_exit_status -ne 0 ]; then \n'
522 <           txt += '               echo "Problems with the registration into LFC" \n'
523 <           txt += '            fi \n'
524 <           txt += '         else \n'
525 <           txt += '            echo "output registered to LFC"\n'
526 <           txt += '         fi \n'
527 <           txt += '         echo "StageOutExitStatus = $register_exit_status" | tee -a $RUNTIME_AREA/$repo\n'
528 <           txt += '      done\n'
529 <           txt += '   else \n'
530 <           txt += '      echo "Trying to copy output file to CloseSE"\n'
531 <           txt += '      CLOSE_SE=`edg-brokerinfo getCloseSEs | head -1`\n'
532 <           txt += '      for out_file in $file_list ; do\n'
533 <           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'
534 <           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'
535 <           txt += '         register_exit_status=$?\n'
536 <           txt += '         echo "REGISTER_EXIT_STATUS = $register_exit_status"\n'
537 <           txt += '         echo "STAGE_OUT = $register_exit_status"\n'
538 <           txt += '         if [ $register_exit_status -ne 0 ]; then \n'
539 <           txt += '            echo "Problems with CloseSE or Catalog" \n'
540 <           txt += '         else \n'
570 <           txt += '            echo "The program was successfully executed"\n'
571 <           txt += '            echo "SE = $CLOSE_SE"\n'
572 <           txt += '            echo "LFN for the file is LFN=${LFN}/$out_file"\n'
573 <           txt += '         fi \n'
574 <           txt += '         echo "StageOutExitStatus = $register_exit_status" | tee -a $RUNTIME_AREA/$repo\n'
575 <           txt += '      done\n'
576 <           txt += '   fi \n'
577 <           txt += '   exit_status=$register_exit_status\n'
578 <           txt += 'fi \n'
493 >        SE_PATH=''
494 >        if int(self.copy_data) == 1:
495 >            if self.SE:
496 >                txt += 'export SE='+self.SE+'\n'
497 >                txt += 'echo "SE = $SE"\n'
498 >            if self.SE_PATH:
499 >                if ( self.SE_PATH[-1] != '/' ) : self.SE_PATH = self.SE_PATH + '/'
500 >                SE_PATH=self.SE_PATH
501 >            if int(self.publish_data) == 1:
502 >                txt += '### publish_data = 1 so the SE path where to copy the output is: \n'
503 >                path_add = self.UserGridName + '/' + self.publish_data_name +'_${PSETHASH}/'
504 >                SE_PATH = SE_PATH + path_add
505 >            txt += 'export SE_PATH='+SE_PATH+'\n'
506 >            txt += 'echo "SE_PATH = $SE_PATH"\n'
507 >            
508 >            txt += 'echo "####################################################"\n'
509 >            txt += 'echo "# Copy output files from WN = `hostname` to SE = $SE"\n'
510 >            txt += 'echo "####################################################"\n'
511 >            
512 >            txt += 'for out_file in $file_list ; do\n'
513 >            txt += '   echo "Trying to copy output file to $SE using srmcp"\n'
514 >            txt += '   cmscp $out_file ${SE} ${SE_PATH} $out_file $middleware\n'
515 >            txt += '   copy_exit_status=$?\n'
516 >            txt += '   echo "COPY_EXIT_STATUS for srmcp = $copy_exit_status"\n'
517 >            txt += '   echo "STAGE_OUT = $copy_exit_status"\n'
518 >            
519 >            txt += '   if [ $copy_exit_status -ne 0 ]; then\n'
520 >            txt += '       echo "Problem copying $out_file to $SE $SE_PATH"\n'
521 >            txt += '       echo "StageOutExitStatus = $copy_exit_status " | tee -a $RUNTIME_AREA/$repo\n'
522 >            txt += '       echo "StageOutExitStatusReason = $exitstring" | tee -a $RUNTIME_AREA/$repo\n'
523 >            txt += '       copy_exit_status=60307\n'
524 >            
525 >            txt += '   else\n'
526 >            txt += '       echo "StageOutSE = $SE" | tee -a $RUNTIME_AREA/$repo\n'
527 >            txt += '       echo "StageOutCatalog = " | tee -a $RUNTIME_AREA/$repo\n'
528 >            txt += '       echo "output copied into $SE/$SE_PATH directory"\n'
529 >            txt += '       echo "StageOutExitStatus = 0" | tee -a $RUNTIME_AREA/$repo\n'
530 >            txt += '       echo "srmcp succeeded"\n'
531 >            txt += '    fi\n'
532 >            txt += 'done\n'
533 >            txt += 'if [ $copy_exit_status -ne 0 ]; then\n'
534 >            txt += '      SE=""\n'
535 >            txt += '      echo "SE = $SE"\n'
536 >            txt += '      SE_PATH=""\n'
537 >            txt += '      echo "SE_PATH = $SE_PATH"\n'
538 >            txt += 'fi\n'
539 >            txt += 'exit_status=$copy_exit_status\n'
540 >            pass
541          return txt
542  
543      def loggingInfo(self, id):
# Line 593 | Line 555 | class SchedulerEdg(Scheduler):
555          cmd_out = runCommand(cmd)
556          return cmd_out
557  
596    ##### FEDE ######        
558      def findSites_(self, n):
559          itr4 =[]
560 +
561          sites = common.jobDB.destination(n)
562 <        if len(sites)>0 and sites[0]=="Any":
562 >
563 >        if len(sites)>0 and sites[0]=="":
564              return itr4
565 +
566          itr = ''
567          if sites != [""]:#CarlosDaniele
568 <            for site in sites:
568 >            ##Addedd Daniele
569 >            replicas = self.blackWhiteListParser.checkBlackList(sites,n)
570 >            if len(replicas)!=0:
571 >                replicas = self.blackWhiteListParser.checkWhiteList(replicas,n)
572 >              
573 >            if len(replicas)==0:
574 >                msg = 'No sites remaining that host any part of the requested data! Exiting... '
575 >                raise CrabException(msg)
576 >            #####        
577 >           # for site in sites:
578 >            for site in replicas:
579                  #itr = itr + 'target.GlueSEUniqueID==&quot;'+site+'&quot; || '
580                  itr = itr + 'target.GlueSEUniqueID=="'+site+'" || '
581              itr = itr[0:-4]
# Line 624 | Line 598 | class SchedulerEdg(Scheduler):
598          jbt = job.type()
599          
600          inp_sandbox = jbt.inputSandbox(index)
601 <        out_sandbox = jbt.outputSandbox(index)
601 >        #out_sandbox = jbt.outputSandbox(index)
602          """
603          [end] FIX-ME
604          """
# Line 640 | Line 614 | class SchedulerEdg(Scheduler):
614          dir = string.split(common.work_space.topDir(), '/')
615          taskName = dir[len(dir)-2]
616    
643        to_writeReq = ''
617          to_write = ''
618  
619          req=' '
# Line 700 | Line 673 | class SchedulerEdg(Scheduler):
673          taskName = dir[len(dir)-2]
674  
675          xml.write(str(title))
676 <        xml.write('<task name="' +str(taskName)+'">\n')
676 >        #xml.write('<task name="' +str(taskName)+'" sub_path="' +common.work_space.pathForTgz() + 'share/.boss_cache">\n')
677 >
678 >        #xml.write('<task name="' +str(taskName)+ '" sub_path="' +common.work_space.pathForTgz() + 'share/.boss_cache"' + '" task_info="' + os.path.expandvars('X509_USER_PROXY') + '">\n')
679 >        x509_cmd = 'ls /tmp/x509up_u`id -u`'
680 >        x509=runCommand(x509_cmd).strip()
681 >        xml.write('<task name="' +str(taskName)+ '" sub_path="' +common.work_space.pathForTgz() + 'share/.boss_cache"' + ' task_info="' + str(x509) + '">\n')
682          xml.write(jt_string)
683          
684          if (to_write != ''):
# Line 727 | Line 705 | class SchedulerEdg(Scheduler):
705          indy: here itr4
706          '''
707          
708 <
709 <        xml.write('<chain scheduler="'+str(self.schedulerName)+'">\n')
708 >        xml.write('<chain name="' +str(taskName)+'__ITR1_" scheduler="'+str(self.schedulerName)+'">\n')
709 >       # xml.write('<chain scheduler="'+str(self.schedulerName)+'">\n')
710          xml.write(jt_string)
711  
712          #executable
# Line 741 | Line 719 | class SchedulerEdg(Scheduler):
719          xml.write('<program>\n')
720          xml.write('<exec> ' + os.path.basename(script) +' </exec>\n')
721          xml.write(jt_string)
722 <    
722 >
723          xml.write('<args> <![CDATA[\n _ITR2_ \n]]> </args>\n')
724          xml.write('<program_types> crabjob </program_types>\n')
725 <        inp_box = script + ','
725 >        inp_box = common.work_space.pathForTgz() + 'job/' + jbt.scriptName + ','
726  
727          if inp_sandbox != None:
728              for fl in inp_sandbox:
# Line 752 | Line 730 | class SchedulerEdg(Scheduler):
730                  pass
731              pass
732  
733 <        inp_box = inp_box + os.path.abspath(os.environ['CRABDIR']+'/python/'+'report.py') + ',' +\
734 <                  os.path.abspath(os.environ['CRABDIR']+'/python/'+'DashboardAPI.py') + ','+\
735 <                  os.path.abspath(os.environ['CRABDIR']+'/python/'+'Logger.py') + ','+\
736 <                  os.path.abspath(os.environ['CRABDIR']+'/python/'+'ProcInfo.py') + ','+\
737 <                  os.path.abspath(os.environ['CRABDIR']+'/python/'+'apmon.py') + ','+\
738 <                  os.path.abspath(os.environ['CRABDIR']+'/python/'+'parseCrabFjr.py')
761 <
762 <        if (not jbt.additional_inbox_files == []):
763 <            inp_box = inp_box + ','
764 <            for addFile in jbt.additional_inbox_files:
765 <                addFile = os.path.abspath(addFile)
766 <                inp_box = inp_box+''+addFile+','
767 <                pass
733 > #        if (not jbt.additional_inbox_files == []):
734 > #            inp_box = inp_box + ','
735 > #            for addFile in jbt.additional_inbox_files:
736 > #                #addFile = os.path.abspath(addFile)
737 > #                inp_box = inp_box+''+addFile+','
738 > #                pass
739  
740          if inp_box[-1] == ',' : inp_box = inp_box[:-1]
741          inp_box = '<infiles> <![CDATA[\n' + inp_box + '\n]]> </infiles>\n'
# Line 832 | Line 803 | class SchedulerEdg(Scheduler):
803          if (self.proxyValid): return
804  
805          ### Just return if asked to do so
806 <        if (self.dontCheckProxy):
806 >        if (self.dontCheckProxy==1):
807              self.proxyValid=1
808              return
809  
839        timeleft = -999
810          minTimeLeft=10*3600 # in seconds
811  
812          minTimeLeftServer = 100 # in hours
# Line 885 | Line 855 | class SchedulerEdg(Scheduler):
855              reTime = re.compile( r'timeleft: (\d+)' )
856              #print "<"+str(reTime.search( cmd_out ).group(1))+">"
857              if reTime.match( cmd_out ):
858 <                time = reTime.search( line ).group(1)
858 >                time = reTime.search( cmd_out ).group(1)
859                  if time < minTimeLeftServer:
860                      renewProxy = 1
861                      common.logger.message('No credential delegation will expire in '+time+' hours: renew it')
# Line 911 | Line 881 | class SchedulerEdg(Scheduler):
881          if self.edg_config_vo:
882              edg_ui_cfg_opt += ' --config-vo ' + self.edg_config_vo + ' '
883          return edg_ui_cfg_opt
884 +
885 +    def submitTout(self, list):
886 +        return 120
887 +
888 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines