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.120 by fanzago, Mon Jun 25 13:54:32 2007 UTC vs.
Revision 1.125 by fanzago, Thu Jun 28 15:45:24 2007 UTC

# Line 81 | Line 81 | class SchedulerEdg(Scheduler):
81  
82          if ( int(self.return_data) == 0 and int(self.copy_data) == 0 ):
83             msg = 'Warning: return_data = 0 and copy_data = 0 ==> your exe output will be lost\n'
84 <           msg = msg + 'Please modify return_data or copy_data value in your crab.cfg file\n'
85 <           raise CrabException(msg)
86 <
87 <        if ( int(self.return_data) == 1 and int(self.copy_data) == 1 ):
88 <           msg = 'Warning: return_data = 1 and copy_data = 1\n'
89 <           msg = msg + 'Please modify return_data or copy_data value in your crab.cfg file\n'
84 >           msg = msg + 'Please modify return_data and copy_data value in your crab.cfg file\n'
85             raise CrabException(msg)
86  
87          ########### FEDE FOR DBS2 ##############################
# Line 97 | Line 92 | class SchedulerEdg(Scheduler):
92                      self.publish_data_name = cfg_params['USER.publish_data_name']
93                  except KeyError:
94                      msg = "Error. The [USER] section does not have 'publish_data_name'"
95 <                    common.logger.message(msg)
95 >                    raise CrabException(msg)
96 >                try:
97 >                    self.UserGridName = string.strip(runCommand("voms-proxy-info -identity | awk -F\'CN\' \'{print $2$3$4}\' | tr -d \'=/ \'"))
98 >                except:
99 >                    msg = "Error. Problem with voms-proxy-info -identity command"
100                      raise CrabException(msg)
101          except KeyError: self.publish_data = 0
102  
# Line 107 | Line 106 | class SchedulerEdg(Scheduler):
106             common.logger.message(msg)
107             raise CrabException(msg)
108          #################################################
109 +
110          try:
111              self.lfc_host = cfg_params['EDG.lfc_host']
112          except KeyError:
# Line 191 | Line 191 | class SchedulerEdg(Scheduler):
191          try: self.schedulerName = cfg_params['CRAB.scheduler']
192          except KeyError: self.scheduler = ''
193  
194 <        try: self.dontCheckProxy=cfg_params["EDG.dont_check_proxy"]
194 >        try: self.dontCheckProxy=int(cfg_params["EDG.dont_check_proxy"])
195          except KeyError: self.dontCheckProxy = 0
196  
197          return
# Line 207 | Line 207 | class SchedulerEdg(Scheduler):
207          self.edg_config_vo = edgConfig.configVO()
208  
209          if (self.edg_config and self.edg_config_vo != ''):
210 <            self.rb_param_file = 'RBconfig = "'+self.edg_config+'";\nRBconfigVO = "'+self.edg_config_vo+'";'
210 >            self.rb_param_file = 'RBconfig = "'+self.edg_config+'";\nRBconfigVO = "'+self.edg_config_vo+'";\n'
211              #print "rb_param_file = ", self.rb_param_file
212          return self.rb_param_file
213        
# Line 487 | Line 487 | class SchedulerEdg(Scheduler):
487                ####### FEDE FOR DBS2
488                if int(self.publish_data) == 1:
489                    txt += '### publish_data = 1 so the SE path where to copy the output is: \n'
490 <                  txt += 'subject=`voms-proxy-info -subject | awk -F\'CN\' \'{print $2$3$4}\' | tr -d \'=/ \'` \n'
491 <                  txt += 'echo "subject = $subject" \n'
492 <                  
493 <                  path_add = '${subject}/'+ self.publish_data_name +'_${PSETHASH}/'
490 >                  #txt += 'subject=`voms-proxy-info -subject | awk -F\'CN\' \'{print $2$3$4}\' | tr -d \'=/ \'` \n'
491 >                  #txt += 'echo "subject = $subject" \n'
492 >                  #path_add = '${subject}/'+ self.publish_data_name +'_${PSETHASH}/'
493 >                  path_add = self.UserGridName + '/' + self.publish_data_name +'_${PSETHASH}/'
494                    SE_PATH = SE_PATH + path_add
495  
496                txt += 'export SE_PATH='+SE_PATH+'\n'
# Line 515 | Line 515 | class SchedulerEdg(Scheduler):
515             txt += '        echo "mkdir -p $HOME/.srmconfig"\n'
516             txt += '        mkdir -p $HOME/.srmconfig\n'
517             txt += '        if [ $middleware == LCG ]; then\n'
518 <           txt += '           echo "srmcp -retry_num 3 -retry_timeout 480000 file:////`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
519 <           txt += '           exitstring=`srmcp -retry_num 3 -retry_timeout 480000 file:////\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
518 >           txt += '           echo "srmcp -retry_num 3 -retry_timeout 480000 file:///`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
519 >           txt += '           exitstring=`srmcp -retry_num 3 -retry_timeout 480000 file:///\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
520             txt += '        elif [ $middleware == OSG ]; then\n'
521 <           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'
522 <           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'
521 >           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'
522 >           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'
523             txt += '        fi \n'
524             txt += '        copy_exit_status=$?\n'
525             txt += '        echo "COPY_EXIT_STATUS for srmcp = $copy_exit_status"\n'
# Line 532 | Line 532 | class SchedulerEdg(Scheduler):
532             txt += '            echo "srmcp failed, attempting lcg-cp."\n'
533             if common.logger.debugLevel() >= 5:
534                 ########### FEDE CHANGES TO WRITE IN SRM LNL.INFN.IT #################
535 <               #txt += '            echo "lcg-cp --vo $VO -t 2400 --verbose file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n'
536 <               #txt += '            exitstring=`lcg-cp --vo $VO -t 2400 --verbose file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n'
537 <               txt += '            echo "lcg-cp --vo $VO -t 2400 --verbose file://`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
538 <               txt += '            exitstring=`lcg-cp --vo $VO -t 2400 --verbose file://\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
535 >               txt += '            echo "lcg-cp --vo $VO -t 2400 --verbose file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n'
536 >               txt += '            exitstring=`lcg-cp --vo $VO -t 2400 --verbose file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n'
537 >               #txt += '            echo "lcg-cp --vo $VO -t 2400 --verbose file://`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
538 >               #txt += '            exitstring=`lcg-cp --vo $VO -t 2400 --verbose file://\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
539             else:              
540 <               #txt += '            echo "lcg-cp --vo $VO -t 2400 file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n'
541 <               #txt += '            exitstring=`lcg-cp --vo $VO -t 2400 file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n'
542 <               txt += '            echo "lcg-cp --vo $VO -t 2400 file://`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
543 <               txt += '            exitstring=`lcg-cp --vo $VO -t 2400 file://\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
540 >               txt += '            echo "lcg-cp --vo $VO -t 2400 file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n'
541 >               txt += '            exitstring=`lcg-cp --vo $VO -t 2400 file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n'
542 >               #txt += '            echo "lcg-cp --vo $VO -t 2400 file://`pwd`/$out_file srm://${SE}:8443${SE_PATH}$out_file"\n'
543 >               #txt += '            exitstring=`lcg-cp --vo $VO -t 2400 file://\`pwd\`/$out_file srm://${SE}:8443${SE_PATH}$out_file 2>&1`\n'
544             txt += '            copy_exit_status=$?\n'
545             txt += '            echo "COPY_EXIT_STATUS for lcg-cp = $copy_exit_status"\n'
546             txt += '            echo "STAGE_OUT = $copy_exit_status"\n'
# Line 962 | Line 962 | class SchedulerEdg(Scheduler):
962          if self.edg_config_vo:
963              edg_ui_cfg_opt += ' --config-vo ' + self.edg_config_vo + ' '
964          return edg_ui_cfg_opt
965 +
966 +    def submitTout(self, list):
967 +        return 120
968 +
969 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines