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.7 by slacapra, Mon Jul 25 14:31:24 2005 UTC vs.
Revision 1.19 by slacapra, Tue Oct 18 14:11:12 2005 UTC

# Line 4 | Line 4 | from crab_exceptions import *
4   from crab_util import *
5   import common
6  
7 < import os, sys, tempfile
7 > import os, sys, time
8  
9   class SchedulerEdg(Scheduler):
10      def __init__(self):
11          Scheduler.__init__(self,"EDG")
12 +        self.states = [ "Acl", "cancelReason", "cancelling","ce_node","children", \
13 +                      "children_hist","children_num","children_states","condorId","condor_jdl", \
14 +                      "cpuTime","destination", "done_code","exit_code","expectFrom", \
15 +                      "expectUpdate","globusId","jdl","jobId","jobtype", \
16 +                      "lastUpdateTime","localId","location", "matched_jdl","network_server", \
17 +                      "owner","parent_job", "reason","resubmitted","rsl","seed",\
18 +                      "stateEnterTime","stateEnterTimes","subjob_failed", \
19 +                      "user tags" , "status" , "status_code","hierarchy"]
20          return
21  
22      def configure(self, cfg_params):
23  
16        try: self.edg_ui_cfg = cfg_params["EDG.rb_config"]
17        except KeyError: self.edg_ui_cfg = ''
18
24          try: self.edg_config = cfg_params["EDG.config"]
25          except KeyError: self.edg_config = ''
26  
# Line 31 | Line 36 | class SchedulerEdg(Scheduler):
36          try: self.EDG_retry_count = cfg_params['EDG.retry_count']
37          except KeyError: self.EDG_retry_count = ''
38  
39 <        try:
40 <            self.VO = cfg_params['EDG.virtual_organization']
36 <        except KeyError:
37 <            msg = 'EDG.virtual_organization is mandatory.'
38 <            raise CrabException(msg)
39 >        try: self.VO = cfg_params['EDG.virtual_organization']
40 >        except KeyError: self.VO = 'cms'
41  
42 <        
43 <        #self.scripts_dir = common.bin_dir + '/scripts'
44 <        #self.cmd_prefix = 'edg'
45 <        #if common.LCG_version == '0' : self.cmd_prefix = 'dg'
42 >        try: self.return_data = cfg_params['USER.return_data']
43 >        except KeyError: self.return_data = ''
44 >
45 >        try:
46 >            self.copy_data = cfg_params["USER.copy_data"]
47 >            try:
48 >                self.SE = cfg_params['USER.storage_element']
49 >                self.SE_PATH = cfg_params['USER.storage_path']
50 >            except KeyError:
51 >                msg = "Error. The [USER] section does not have 'storage_element'"
52 >                msg = msg + " and/or 'storage_path' entries, necessary to copy the output"
53 >                common.logger.message(msg)
54 >                raise CrabException(msg)
55 >        except KeyError: self.copy_data = ''
56 >
57 >        try:
58 >            self.register_data = cfg_params["USER.register_data"]
59 >            try:
60 >                 self.LFN = cfg_params['USER.lfn_dir']
61 >            except KeyError:
62 >                msg = "Error. The [USER] section does not have 'lfn_dir' value"
63 >                msg = msg + " it's necessary for RLS registration"
64 >                common.logger.message(msg)
65 >                raise CrabException(msg)
66 >        except KeyError: self.register_data= ''
67 >
68 >        try: self.EDG_requirements = cfg_params['EDG.requirements']
69 >        except KeyError: self.EDG_requirements = ''
70 >                                                                                                                                                            
71 >        try: self.EDG_retry_count = cfg_params['EDG.retry_count']
72 >        except KeyError: self.EDG_retry_count = ''
73 >                                                                                                                                                            
74 >        try: self.EDG_clock_time = cfg_params['EDG.max_wall_clock_time']
75 >        except KeyError: self.EDG_clock_time= ''
76 >                                                                                                                                                            
77 >        try: self.EDG_cpu_time = cfg_params['EDG.max_cpu_time']
78 >        except KeyError: self.EDG_cpu_time = ''
79  
80          # Add EDG_WL_LOCATION to the python path
81  
# Line 55 | Line 90 | class SchedulerEdg(Scheduler):
90          libPath=os.path.join(path, "lib", "python")
91          sys.path.append(libPath)
92  
93 <        self.checkProxy_()
93 >        self.proxyValid=0
94          return
95      
96 +
97 +    def sched_parameter(self):
98 +        """
99 +        Returns file with scheduler-specific parameters
100 +        """
101 +      
102 +        if (self.edg_config and self.edg_config_vo != ''):
103 +            self.param='sched_param.clad'
104 +            param_file = open(common.work_space.shareDir()+'/'+self.param, 'w')
105 +            param_file.write('RBconfig = "'+self.edg_config+'";\n')  
106 +            param_file.write('RBconfigVO = "'+self.edg_config_vo+'";')
107 +            param_file.close()  
108 +            return 1
109 +        else:
110 +            return 0
111 +
112      def wsSetupEnvironment(self):
113          """
114          Returns part of a job script which does scheduler-specific work.
115          """
116 <        txt = '\n'
116 >
117 >        txt = ''
118 >        if self.copy_data:
119 >           if self.SE:
120 >              txt += 'export SE='+self.SE+'\n'
121 >              txt += 'echo "SE = $SE"\n'
122 >           if self.SE_PATH:
123 >              if ( self.SE_PATH[-1] != '/' ) : self.SE_PATH = self.SE_PATH + '/'
124 >              txt += 'export SE_PATH='+self.SE_PATH+'\n'
125 >              txt += 'echo "SE_PATH = $SE_PATH"\n'
126 >                                                                                                                                                            
127 >        if self.register_data:
128 >           if self.VO:
129 >              txt += 'export VO='+self.VO+'\n'
130 >           if self.LFN:
131 >              txt += 'export LFN='+self.LFN+'\n'
132 >              txt += '\n'
133          txt += 'CloseCEs=`edg-brokerinfo getCE`\n'
134          txt += 'echo "CloseCEs = $CloseCEs"\n'
135          txt += 'CE=`echo $CloseCEs | sed -e "s/:.*//"`\n'
136          txt += 'echo "CE = $CE"\n'
137          return txt
138  
139 +    def wsCopyOutput(self):
140 +        """
141 +        Write a CopyResults part of a job script, e.g.
142 +        to copy produced output into a storage element.
143 +        """
144 +        txt = ''
145 +        if self.copy_data:
146 +           copy = 'globus-url-copy file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file'
147 +           txt += '#\n'
148 +           txt += '#   Copy output to SE = $SE\n'
149 +           txt += '#\n'
150 +           #### per orca l'exit_status non e' affidabile.....
151 +           #txt += 'if [ $executable_exit_status -eq 0 ]; then\n'
152 +           txt += 'if [ $exe_result -eq 0 ]; then\n'
153 +           txt += '  for out_file in $file_list ; do\n'
154 +           txt += '    echo "Trying to copy output file to $SE "\n'
155 +           txt += '    echo "'+copy+'"\n'
156 +           txt += '    '+copy+' 2>&1\n'
157 +           txt += '    copy_exit_status=$?\n'
158 +           txt += '    echo "COPY_EXIT_STATUS = $copy_exit_status"\n'
159 +           txt += '    echo "STAGE_OUT = $copy_exit_status"\n'
160 +           txt += '    if [ $copy_exit_status -ne 0 ]; then \n'
161 +           txt += '       echo "Problems with SE= $SE" \n'
162 +           txt += '    else \n'
163 +           txt += '       echo "output copied into $SE/$SE_PATH directory"\n'
164 +           txt += '    fi \n'
165 +           txt += '  done\n'
166 +           txt += 'fi \n'
167 +        return txt
168 +
169 +    def wsRegisterOutput(self):
170 +        """
171 +        Returns part of a job script which does scheduler-specific work.
172 +        """
173 +
174 +        txt = ''
175 +        if self.register_data:
176 +           txt += '#\n'
177 +           txt += '#  Register output to RLS\n'
178 +           txt += '#\n'
179 +           ### analogo
180 +           #txt += 'if [[ $executable_exit_status -eq 0 && $copy_exit_status -eq 0 ]]; then\n'
181 +           txt += 'if [[ $exe_result -eq 0 && $copy_exit_status -eq 0 ]]; then\n'
182 +           txt += '   for out_file in $file_list ; do\n'
183 +           txt += '      echo "Trying to register the output file into RLS"\n'
184 +           txt += '      echo "lcg-rf -l $LFN/$out_file --vo $VO sfn://$SE$SE_PATH/$out_file"\n'
185 +           txt += '      lcg-rf -l $LFN/$out_file --vo $VO sfn://$SE$SE_PATH/$out_file 2>&1 \n'
186 +           txt += '      register_exit_status=$?\n'
187 +           txt += '      echo "REGISTER_EXIT_STATUS = $register_exit_status"\n'
188 +           txt += '      echo "STAGE_OUT = $register_exit_status"\n'
189 +           txt += '      if [ $register_exit_status -ne 0 ]; then \n'
190 +           txt += '         echo "Problems with the registration to RLS" \n'
191 +           txt += '         echo "Try with srm protocol" \n'
192 +           txt += '         echo "lcg-rf -l $LFN/$out_file --vo $VO srm://$SE$SE_PATH/$out_file"\n'
193 +           txt += '         lcg-rf -l $LFN/$out_file --vo $VO srm://$SE$SE_PATH/$out_file 2>&1 \n'
194 +           txt += '         register_exit_status=$?\n'
195 +           txt += '         echo "REGISTER_EXIT_STATUS = $register_exit_status"\n'
196 +           txt += '         echo "STAGE_OUT = $register_exit_status"\n'
197 +           txt += '         if [ $register_exit_status -ne 0 ]; then \n'
198 +           txt += '            echo "Problems with the registration into RLS" \n'
199 +           txt += '         fi \n'
200 +           txt += '      else \n'
201 +           txt += '         echo "output registered to RLS"\n'
202 +           txt += '      fi \n'
203 +           txt += '   done\n'
204 +           txt += 'elif [[ $exe_result -eq 0 && $copy_exit_status -ne 0 ]]; then \n'
205 +           txt += '   echo "Trying to copy output file to CloseSE"\n'
206 +           txt += '   CLOSE_SE=`edg-brokerinfo getCloseSEs | head -1`\n'
207 +           txt += '   for out_file in $file_list ; do\n'
208 +           txt += '      echo "lcg-cr -v -l lfn:${LFN}/$out_file -d $SE -P $LFN/$out_file --vo $VO file://`pwd`/$out_file" \n'
209 +           txt += '      lcg-cr -v -l lfn:${LFN}/$out_file -d $SE -P $LFN/$out_file --vo $VO file://`pwd`/$out_file 2>&1 \n'
210 +           txt += '      register_exit_status=$?\n'
211 +           txt += '      echo "REGISTER_EXIT_STATUS = $register_exit_status"\n'
212 +           txt += '      echo "STAGE_OUT = $register_exit_status"\n'
213 +           txt += '      if [ $register_exit_status -ne 0 ]; then \n'
214 +           txt += '         echo "Problems with CloseSE" \n'
215 +           txt += '      else \n'
216 +           txt += '         echo "The program was successfully executed"\n'
217 +           txt += '         echo "SE = $CLOSE_SE"\n'
218 +           txt += '         echo "LFN for the file is LFN=${LFN}/$out_file"\n'
219 +           txt += '      fi \n'
220 +           txt += '   done\n'
221 +           txt += 'else\n'
222 +           txt += '   echo "Problem with the executable"\n'
223 +           txt += 'fi \n'
224 +        return txt
225 +        #####################
226 +
227      def loggingInfo(self, nj):
228          """
229          retrieve the logging info from logging and bookkeeping and return it
230          """
231 +        self.checkProxy()
232          id = common.jobDB.jobId(nj)
233 <        edg_ui_cfg_opt = ''
78 <        if self.edg_config:
79 <          edg_ui_cfg_opt = ' -c ' + self.edg_config + ' '
80 <        cmd = 'edg-job-get-logging-info -v 2 ' + edg_ui_cfg_opt + id
81 <        print cmd
233 >        cmd = 'edg-job-get-logging-info -v 2 ' + self.configOpt_() + id
234          myCmd = os.popen(cmd)
235          cmd_out = myCmd.readlines()
236          myCmd.close()
# Line 88 | Line 240 | class SchedulerEdg(Scheduler):
240          """
241          Check the compatibility of available resources
242          """
243 +        self.checkProxy()
244          jdl = common.job_list[nj].jdlFilename()
245 <        edg_ui_cfg_opt = ''
93 <        if self.edg_config:
94 <          edg_ui_cfg_opt = ' -c ' + self.edg_config + ' '
95 <        if self.edg_config_vo:
96 <          edg_ui_cfg_opt += ' --config-vo ' + self.edg_config_vo + ' '
97 <        cmd = 'edg-job-list-match ' + edg_ui_cfg_opt + jdl
245 >        cmd = 'edg-job-list-match ' + self.configOpt_() + jdl
246          myCmd = os.popen(cmd)
247          cmd_out = myCmd.readlines()
248          myCmd.close()
# Line 112 | Line 260 | class SchedulerEdg(Scheduler):
260          Match=0
261          for line in out:
262              line = line.strip()
115            #print line
263              if reComment.match( line ):
264                  next = 0
265                  continue
# Line 166 | Line 313 | class SchedulerEdg(Scheduler):
313          Submit one EDG job.
314          """
315  
316 +        self.checkProxy()
317          jid = None
318          jdl = common.job_list[nj].jdlFilename()
319 <        id_tmp = tempfile.mktemp()
320 <        edg_ui_cfg_opt = ' '
173 <        if self.edg_config:
174 <          edg_ui_cfg_opt = ' -c ' + self.edg_config + ' '
175 <        if self.edg_config_vo:
176 <          edg_ui_cfg_opt += ' --config-vo ' + self.edg_config_vo + ' '
177 <        cmd = 'edg-job-submit -o ' + id_tmp + edg_ui_cfg_opt + jdl
319 >
320 >        cmd = 'edg-job-submit ' + self.configOpt_() + jdl
321          cmd_out = runCommand(cmd)
322          if cmd_out != None:
323 <            idfile = open(id_tmp)
324 <            jid_line = idfile.readline()
182 <            while jid_line[0] == '#':
183 <                jid_line = idfile.readline()
184 <                pass
185 <            jid = string.strip(jid_line)
186 <            os.unlink(id_tmp)
323 >            reSid = re.compile( r'https.+' )
324 >            jid = reSid.search(cmd).group()
325              pass
326          return jid
327  
328 +    def getExitStatus(self, id):
329 +        return self.getStatusAttribute_(id, 'exit_code')
330 +
331      def queryStatus(self, id):
332 +        return self.getStatusAttribute_(id, 'status')
333 +
334 +    def queryDest(self, id):  
335 +        return self.getStatusAttribute_(id, 'destination')
336 +
337 +
338 +    def getStatusAttribute_(self, id, attr):
339          """ Query a status of the job with id """
340 <        cmd0 = 'edg-job-status '
341 <        cmd = cmd0 + id
342 <        cmd_out = runCommand(cmd)
343 <        if cmd_out == None:
344 <            common.logger.message('Error. No output from `'+cmd+'`')
345 <            return None
346 <        # parse output
347 <        status_prefix = 'Current Status:'
348 <        status_index = string.find(cmd_out, status_prefix)
349 <        if status_index == -1:
350 <            common.logger.message('Error. Bad output of `'+cmd0+'`:\n'+cmd_out)
340 >
341 >        self.checkProxy()
342 >        hstates = {}
343 >        Status = importName('edg_wl_userinterface_common_LbWrapper', 'Status')
344 >        # Bypass edg-job-status interfacing directly to C++ API
345 >        # Job attribute vector to retrieve status without edg-job-status
346 >        level = 0
347 >        # Instance of the Status class provided by LB API
348 >        jobStat = Status()
349 >        st = 0
350 >        jobStat.getStatus(id, level)
351 >        err, apiMsg = jobStat.get_error()
352 >        if err:
353 >            print 'Error caught', apiMsg
354 >            common.log.message(apiMsg)
355              return None
356 <        status = cmd_out[(status_index+len(status_prefix)):]
357 <        nl = string.find(status,'\n')
358 <        status = string.strip(status[0:nl])
359 <        return status
356 >        else:
357 >            for i in range(len(self.states)):
358 >                # Fill an hash table with all information retrieved from LB API
359 >                hstates[ self.states[i] ] = jobStat.loadStatus(st)[i]
360 >            result = jobStat.loadStatus(st)[ self.states.index(attr) ]
361 >            return result
362  
363      def queryDetailedStatus(self, id):
364          """ Query a detailed status of the job with id """
# Line 218 | Line 372 | class SchedulerEdg(Scheduler):
372          Returns the name of directory with results.
373          """
374  
375 +        self.checkProxy()
376          cmd = 'edg-job-get-output --dir ' + common.work_space.resDir() + ' ' + id
377          cmd_out = runCommand(cmd)
378  
# Line 229 | Line 384 | class SchedulerEdg(Scheduler):
384  
385      def cancel(self, id):
386          """ Cancel the EDG job with id """
387 +        self.checkProxy()
388          cmd = 'edg-job-cancel --noint ' + id
389          cmd_out = runCommand(cmd)
390          return cmd_out
391  
392 <    def checkProxy_(self):
237 <        """
238 <        Function to check the Globus proxy.
239 <        """
240 <        cmd = 'grid-proxy-info -timeleft'
241 <        cmd_out = runCommand(cmd)
242 <        ok = 1
243 <        timeleft = -999
244 <        try: timeleft = int(cmd_out)
245 <        except ValueError: ok=0
246 <        except TypeError: ok=0
247 <        if timeleft < 1:  ok=0
248 <
249 <        if ok==0:
250 <            msg = 'No valid proxy found !\n'
251 <            msg += "Please do 'grid-proxy-init'."
252 <            raise CrabException(msg)
253 <        return
254 <    
255 <    def createJDL(self, nj):
392 >    def createSchScript(self, nj):
393          """
394          Create a JDL-file for EDG.
395          """
396  
397          job = common.job_list[nj]
398          jbt = job.type()
262 #        jbt.loadJobInfo()
399          inp_sandbox = jbt.inputSandbox(nj)
400          out_sandbox = jbt.outputSandbox(nj)
401 <        inp_storage_subdir = ''#jbt.inputStorageSubdir()
401 >        inp_storage_subdir = ''
402          
403          title = '# This JDL was generated by '+\
404                  common.prog_name+' (version '+common.prog_version_str+')\n'
405          jt_string = ''
406 +
407 +
408          
409          SPL = inp_storage_subdir
410          if ( SPL and SPL[-1] != '/' ) : SPL = SPL + '/'
# Line 279 | Line 417 | class SchedulerEdg(Scheduler):
417          jdl.write('Executable = "' + os.path.basename(script) +'";\n')
418          jdl.write(jt_string)
419  
420 +        ### only one .sh  JDL has arguments:
421 +        firstEvent = common.jobDB.firstEvent(nj)
422 +        maxEvents = common.jobDB.maxEvents(nj)
423 +        jdl.write('Arguments = "' + str(nj+1)+' '+str(firstEvent)+' '+str(maxEvents)+'";\n')
424 +
425          inp_box = 'InputSandbox = { '
426          inp_box = inp_box + '"' + script + '",'
427  
# Line 302 | Line 445 | class SchedulerEdg(Scheduler):
445  
446          jdl.write('StdOutput     = "' + job.stdout() + '";\n')
447          jdl.write('StdError      = "' + job.stderr() + '";\n')
448 <
449 <        #if common.flag_return_data :
450 <        #    for fl in job.outputDataFiles():
451 <        #        out_box = out_box + ' "' + fl + '",'
452 <        #        pass
453 <        #    pass
454 <
455 <        out_box = 'OutputSandbox = { '
456 <        if out_sandbox != None:
457 <            for fl in out_sandbox:
458 <                out_box = out_box + ' "' + fl + '",'
448 >        
449 >        
450 >        if job.stdout() == job.stderr():
451 >          out_box = 'OutputSandbox = { "' + \
452 >                    job.stdout() + '", ".BrokerInfo",'
453 >        else:
454 >          out_box = 'OutputSandbox = { "' + \
455 >                    job.stdout() + '", "' + \
456 >                    job.stderr() + '", ".BrokerInfo",'
457 >
458 >        if self.return_data :
459 >            if out_sandbox != None:
460 >                for fl in out_sandbox:
461 >                    out_box = out_box + ' "' + fl + '",'
462 >                    pass
463                  pass
464              pass
465 <
465 >                                                                                                                                                            
466          if out_box[-1] == ',' : out_box = out_box[:-1]
467          out_box = out_box + ' };'
468          jdl.write(out_box+'\n')
469  
470 <        # If CloseCE is used ...
324 <        #if common.flag_usecloseCE and job.inputDataFiles():
325 <        #    indata = 'InputData = { '
326 <        #    for fl in job.inputDataFiles():
327 <        #       indata = indata + ' "lfn:' + SPL + fl + '",'
328 <        #    if indata[-1] == ',' : indata = indata[:-1]
329 <        #    indata = indata + ' };'
330 <        #    jdl.write(indata+'\n')
331 <        #    jdl.write('DataAccessProtocol = { "gsiftp" };\n')
332 <
470 >        ### if at least a CE exists ...
471          if common.analisys_common_info['sites']:
472 <           if common.analisys_common_info['sw_version']:
473 <
474 <             req='Requirements = '
475 <         ### First ORCA version
476 <             req=req + 'Member("VO-cms-' + \
477 <                 common.analisys_common_info['sw_version'] + \
478 <                 '", other.GlueHostApplicationSoftwareRunTimeEnvironment)'
479 <         ## then sites
480 <             if len(common.analisys_common_info['sites'])>0:
481 <               req = req + ' && ('
482 <             for i in range(len(common.analisys_common_info['sites'])):
483 <                req = req + 'other.GlueCEInfoHostName == "' \
484 <                      + common.analisys_common_info['sites'][i] + '"'
485 <                if ( i < (int(len(common.analisys_common_info['sites']) - 1)) ):
486 <                    req = req + ' || '
487 <             req = req + ')'
488 <         ## then user requirement
489 <             if self.EDG_requirements:
490 <               req = req +  ' && ' + self.EDG_requirements
491 <             req = req + ';\n'
492 <        jdl.write(req)
493 <
472 >            if common.analisys_common_info['sw_version']:
473 >                req='Requirements = '
474 >                req=req + 'Member("VO-cms-' + \
475 >                     common.analisys_common_info['sw_version'] + \
476 >                     '", other.GlueHostApplicationSoftwareRunTimeEnvironment)'
477 >            if len(common.analisys_common_info['sites'])>0:
478 >                req = req + ' && ('
479 >                for i in range(len(common.analisys_common_info['sites'])):
480 >                    req = req + 'other.GlueCEInfoHostName == "' \
481 >                         + common.analisys_common_info['sites'][i] + '"'
482 >                    if ( i < (int(len(common.analisys_common_info['sites']) - 1)) ):
483 >                        req = req + ' || '
484 >            req = req + ')'
485 >
486 >            #### and USER REQUIREMENT
487 >            if self.EDG_requirements:
488 >                req = req +  ' && ' + self.EDG_requirements
489 >            if self.EDG_clock_time:
490 >                req = req + ' && other.GlueCEPolicyMaxWallClockTime>='+self.EDG_clock_time
491 >            if self.EDG_cpu_time:
492 >                req = req + ' && other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time
493 >            req = req + ';\n'
494 >            jdl.write(req)
495 >                                                                                                                                                            
496          jdl.write('VirtualOrganisation = "' + self.VO + '";\n')
497  
498          if ( self.EDG_retry_count ):              
# Line 361 | Line 501 | class SchedulerEdg(Scheduler):
501  
502          jdl.close()
503          return
504 +
505 +    def checkProxy(self):
506 +        """
507 +        Function to check the Globus proxy.
508 +        """
509 +        if (self.proxyValid): return
510 +        timeleft = -999
511 +        minTimeLeft=10 # in hours
512 +        cmd = 'grid-proxy-info -e -v '+str(minTimeLeft)+':00'
513 +        try: cmd_out = runCommand(cmd,0)
514 +        except: print cmd_out
515 +        if (cmd_out == None or cmd_out=='1'):
516 +            common.logger.message( "No valid proxy found or timeleft too short!\n Creating a user proxy with default length of 100h\n")
517 +            cmd = 'grid-proxy-init -valid 100:00'
518 +            try:
519 +                out = os.system(cmd)
520 +                if (out>0): raise CrabException("Unable to create a valid proxy!\n")
521 +            except:
522 +                msg = "Unable to create a valid proxy!\n"
523 +                raise CrabException(msg)
524 +            cmd = 'grid-proxy-info -timeleft'
525 +            cmd_out = runCommand(cmd,0)
526 +            print cmd_out, time.time()
527 +            #time.time(cms_out)
528 +            pass
529 +        self.proxyValid=1
530 +        return
531 +    
532 +    def configOpt_(self):
533 +        edg_ui_cfg_opt = ' '
534 +        if self.edg_config:
535 +          edg_ui_cfg_opt = ' -c ' + self.edg_config + ' '
536 +        if self.edg_config_vo:
537 +          edg_ui_cfg_opt += ' --config-vo ' + self.edg_config_vo + ' '
538 +        return edg_ui_cfg_opt

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines