18 |
|
"owner","parent_job", "reason","resubmitted","rsl","seed",\ |
19 |
|
"stateEnterTime","stateEnterTimes","subjob_failed", \ |
20 |
|
"user tags" , "status" , "status_code","hierarchy"] |
21 |
+ |
|
22 |
|
return |
23 |
|
|
24 |
|
def configure(self, cfg_params): |
25 |
|
|
26 |
|
try: |
27 |
< |
RB = cfg_params["EDG.rb"] |
28 |
< |
edgConfig = EdgConfig(RB) |
28 |
< |
self.edg_config = edgConfig.config() |
29 |
< |
self.edg_config_vo = edgConfig.configVO() |
27 |
> |
RB=cfg_params["EDG.rb"] |
28 |
> |
self.rb_param_file=self.rb_configure(RB) |
29 |
|
except KeyError: |
30 |
< |
self.edg_config = '' |
31 |
< |
self.edg_config_vo = '' |
33 |
< |
|
30 |
> |
self.rb_param_file='' |
31 |
> |
pass |
32 |
|
try: |
33 |
|
self.proxyServer = cfg_params["EDG.proxy_server"] |
34 |
|
except KeyError: |
35 |
|
self.proxyServer = 'myproxy.cern.ch' |
36 |
|
common.logger.debug(5,'Setting myproxy server to '+self.proxyServer) |
37 |
|
|
38 |
+ |
try: |
39 |
+ |
self.group = cfg_params["EDG.group"] |
40 |
+ |
except KeyError: |
41 |
+ |
self.group = None |
42 |
+ |
|
43 |
+ |
try: |
44 |
+ |
self.role = cfg_params["EDG.role"] |
45 |
+ |
except KeyError: |
46 |
+ |
self.role = None |
47 |
+ |
|
48 |
|
try: self.LCG_version = cfg_params["EDG.lcg_version"] |
49 |
|
except KeyError: self.LCG_version = '2' |
50 |
|
|
43 |
– |
try: self.EDG_requirements = cfg_params['EDG.requirements'] |
44 |
– |
except KeyError: self.EDG_requirements = '' |
45 |
– |
|
46 |
– |
try: self.EDG_retry_count = cfg_params['EDG.retry_count'] |
47 |
– |
except KeyError: self.EDG_retry_count = '' |
48 |
– |
|
51 |
|
try: |
52 |
|
self.EDG_ce_black_list = cfg_params['EDG.ce_black_list'] |
51 |
– |
#print "self.EDG_ce_black_list = ", self.EDG_ce_black_list |
53 |
|
except KeyError: |
54 |
|
self.EDG_ce_black_list = '' |
55 |
|
|
56 |
|
try: |
57 |
|
self.EDG_ce_white_list = cfg_params['EDG.ce_white_list'] |
57 |
– |
#print "self.EDG_ce_white_list = ", self.EDG_ce_white_list |
58 |
|
except KeyError: self.EDG_ce_white_list = '' |
59 |
|
|
60 |
|
try: self.VO = cfg_params['EDG.virtual_organization'] |
61 |
|
except KeyError: self.VO = 'cms' |
62 |
|
|
63 |
< |
try: self.return_data = cfg_params['USER.return_data'] |
64 |
< |
except KeyError: self.return_data = 1 |
65 |
< |
|
66 |
< |
try: |
67 |
< |
self.copy_input_data = common.analisys_common_info['copy_input_data'] |
68 |
< |
#print "self.copy_input_data = ", self.copy_input_data |
63 |
> |
try: self.copy_input_data = cfg_params["USER.copy_input_data"] |
64 |
|
except KeyError: self.copy_input_data = 0 |
65 |
|
|
66 |
+ |
try: self.return_data = cfg_params['USER.return_data'] |
67 |
+ |
except KeyError: self.return_data = 0 |
68 |
+ |
|
69 |
|
try: |
70 |
|
self.copy_data = cfg_params["USER.copy_data"] |
71 |
|
if int(self.copy_data) == 1: |
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 ############################## |
88 |
+ |
try: |
89 |
+ |
self.publish_data = cfg_params["USER.publish_data"] |
90 |
+ |
if int(self.publish_data) == 1: |
91 |
+ |
try: |
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 |
+ |
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 |
+ |
|
103 |
+ |
if ( int(self.copy_data) == 0 and int(self.publish_data) == 1 ): |
104 |
+ |
msg = 'Warning: publish_data = 1 must be used with copy_data = 1\n' |
105 |
+ |
msg = msg + 'Please modify copy_data value in your crab.cfg file\n' |
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: |
149 |
|
|
150 |
|
try: self.EDG_requirements = cfg_params['EDG.requirements'] |
151 |
|
except KeyError: self.EDG_requirements = '' |
152 |
< |
|
152 |
> |
|
153 |
> |
try: self.EDG_addJdlParam = string.split(cfg_params['EDG.additional_jdl_parameters'],',') |
154 |
> |
except KeyError: self.EDG_addJdlParam = [] |
155 |
> |
|
156 |
|
try: self.EDG_retry_count = cfg_params['EDG.retry_count'] |
157 |
|
except KeyError: self.EDG_retry_count = '' |
158 |
< |
|
158 |
> |
|
159 |
> |
try: self.EDG_shallow_retry_count= cfg_params['EDG.shallow_retry_count'] |
160 |
> |
except KeyError: self.EDG_shallow_retry_count = '' |
161 |
> |
|
162 |
|
try: self.EDG_clock_time = cfg_params['EDG.max_wall_clock_time'] |
163 |
|
except KeyError: self.EDG_clock_time= '' |
164 |
< |
|
164 |
> |
|
165 |
|
try: self.EDG_cpu_time = cfg_params['EDG.max_cpu_time'] |
166 |
|
except KeyError: self.EDG_cpu_time = '' |
167 |
|
|
179 |
|
sys.path.append(libPath) |
180 |
|
|
181 |
|
self.proxyValid=0 |
182 |
+ |
|
183 |
+ |
try: |
184 |
+ |
self._taskId = cfg_params['taskId'] |
185 |
+ |
except: |
186 |
+ |
self._taskId = '' |
187 |
+ |
|
188 |
+ |
try: self.jobtypeName = cfg_params['CRAB.jobtype'] |
189 |
+ |
except KeyError: self.jobtypeName = '' |
190 |
+ |
|
191 |
+ |
try: self.schedulerName = cfg_params['CRAB.scheduler'] |
192 |
+ |
except KeyError: self.scheduler = '' |
193 |
+ |
|
194 |
+ |
try: self.dontCheckProxy=int(cfg_params["EDG.dont_check_proxy"]) |
195 |
+ |
except KeyError: self.dontCheckProxy = 0 |
196 |
+ |
|
197 |
|
return |
198 |
|
|
199 |
|
|
200 |
+ |
def rb_configure(self, RB): |
201 |
+ |
self.edg_config = '' |
202 |
+ |
self.edg_config_vo = '' |
203 |
+ |
self.rb_param_file = '' |
204 |
+ |
|
205 |
+ |
edgConfig = EdgConfig(RB) |
206 |
+ |
self.edg_config = edgConfig.config() |
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+'";\n' |
211 |
+ |
#print "rb_param_file = ", self.rb_param_file |
212 |
+ |
return self.rb_param_file |
213 |
+ |
|
214 |
+ |
|
215 |
|
def sched_parameter(self): |
216 |
|
""" |
217 |
< |
Returns file with scheduler-specific parameters |
217 |
> |
Returns file with requirements and scheduler-specific parameters |
218 |
|
""" |
219 |
< |
|
220 |
< |
if (self.edg_config and self.edg_config_vo != ''): |
221 |
< |
self.param='sched_param.clad' |
219 |
> |
index = int(common.jobDB.nJobs()) - 1 |
220 |
> |
job = common.job_list[index] |
221 |
> |
jbt = job.type() |
222 |
> |
|
223 |
> |
lastBlock=-1 |
224 |
> |
first = [] |
225 |
> |
for n in range(common.jobDB.nJobs()): |
226 |
> |
currBlock=common.jobDB.block(n) |
227 |
> |
if (currBlock!=lastBlock): |
228 |
> |
lastBlock = currBlock |
229 |
> |
first.append(n) |
230 |
> |
|
231 |
> |
req = '' |
232 |
> |
req = req + jbt.getRequirements() |
233 |
> |
|
234 |
> |
if self.EDG_requirements: |
235 |
> |
if (req == ' '): |
236 |
> |
req = req + self.EDG_requirements |
237 |
> |
else: |
238 |
> |
req = req + ' && ' + self.EDG_requirements |
239 |
> |
|
240 |
> |
if self.EDG_ce_white_list: |
241 |
> |
ce_white_list = string.split(self.EDG_ce_white_list,',') |
242 |
> |
for i in range(len(ce_white_list)): |
243 |
> |
if i == 0: |
244 |
> |
if (req == ' '): |
245 |
> |
req = req + '((RegExp("' + string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))' |
246 |
> |
else: |
247 |
> |
req = req + ' && ((RegExp("' + string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))' |
248 |
> |
pass |
249 |
> |
else: |
250 |
> |
req = req + ' || (RegExp("' + string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))' |
251 |
> |
req = req + ')' |
252 |
> |
|
253 |
> |
if self.EDG_ce_black_list: |
254 |
> |
ce_black_list = string.split(self.EDG_ce_black_list,',') |
255 |
> |
for ce in ce_black_list: |
256 |
> |
if (req == ' '): |
257 |
> |
req = req + '(!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))' |
258 |
> |
else: |
259 |
> |
req = req + ' && (!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))' |
260 |
> |
pass |
261 |
> |
if self.EDG_clock_time: |
262 |
> |
if (req == ' '): |
263 |
> |
req = req + 'other.GlueCEPolicyMaxWallClockTime>='+self.EDG_clock_time |
264 |
> |
else: |
265 |
> |
req = req + ' && other.GlueCEPolicyMaxWallClockTime>='+self.EDG_clock_time |
266 |
> |
|
267 |
> |
if self.EDG_cpu_time: |
268 |
> |
if (req == ' '): |
269 |
> |
req = req + ' other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time |
270 |
> |
else: |
271 |
> |
req = req + ' && other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time |
272 |
> |
|
273 |
> |
for i in range(len(first)): # Add loop DS |
274 |
> |
groupReq = req |
275 |
> |
self.param='sched_param_'+str(i)+'.clad' |
276 |
|
param_file = open(common.work_space.shareDir()+'/'+self.param, 'w') |
277 |
< |
param_file.write('RBconfig = "'+self.edg_config+'";\n') |
278 |
< |
param_file.write('RBconfigVO = "'+self.edg_config_vo+'";') |
277 |
> |
|
278 |
> |
itr4=self.findSites_(first[i]) |
279 |
> |
for arg in itr4: |
280 |
> |
groupReq = groupReq + ' && anyMatch(other.storage.CloseSEs, ('+str(arg)+'))' |
281 |
> |
param_file.write('Requirements = '+groupReq +';\n') |
282 |
> |
|
283 |
> |
if (self.rb_param_file != ''): |
284 |
> |
param_file.write(self.rb_param_file) |
285 |
> |
|
286 |
> |
if len(self.EDG_addJdlParam): |
287 |
> |
for p in self.EDG_addJdlParam: |
288 |
> |
param_file.write(p) |
289 |
> |
|
290 |
|
param_file.close() |
291 |
< |
return 1 |
170 |
< |
else: |
171 |
< |
return 0 |
291 |
> |
|
292 |
|
|
293 |
|
def wsSetupEnvironment(self): |
294 |
|
""" |
295 |
|
Returns part of a job script which does scheduler-specific work. |
296 |
|
""" |
297 |
|
txt = '' |
298 |
+ |
txt += '# strip arguments\n' |
299 |
+ |
txt += 'echo "strip arguments"\n' |
300 |
+ |
txt += 'args=("$@")\n' |
301 |
+ |
txt += 'nargs=$#\n' |
302 |
+ |
txt += 'shift $nargs\n' |
303 |
+ |
txt += "# job number (first parameter for job wrapper)\n" |
304 |
+ |
#txt += "NJob=$1\n" |
305 |
+ |
txt += "NJob=${args[0]}\n" |
306 |
+ |
|
307 |
+ |
txt += '# job identification to DashBoard \n' |
308 |
+ |
txt += 'MonitorJobID=`echo ${NJob}_$EDG_WL_JOBID`\n' |
309 |
+ |
txt += 'SyncGridJobId=`echo $EDG_WL_JOBID`\n' |
310 |
+ |
txt += 'MonitorID=`echo ' + self._taskId + '`\n' |
311 |
+ |
txt += 'echo "MonitorJobID=`echo $MonitorJobID`" | tee -a $RUNTIME_AREA/$repo \n' |
312 |
+ |
txt += 'echo "SyncGridJobId=`echo $SyncGridJobId`" | tee -a $RUNTIME_AREA/$repo \n' |
313 |
+ |
txt += 'echo "MonitorID=`echo $MonitorID`" | tee -a $RUNTIME_AREA/$repo\n' |
314 |
+ |
|
315 |
|
txt += 'echo "middleware discovery " \n' |
316 |
< |
txt += 'if [ $VO_CMS_SW_DIR ]; then\n' |
180 |
< |
txt += ' middleware=LCG \n' |
181 |
< |
txt += ' echo "middleware =$middleware" \n' |
182 |
< |
txt += 'elif [ $GRID3_APP_DIR ]; then\n' |
316 |
> |
txt += 'if [ $GRID3_APP_DIR ]; then\n' |
317 |
|
txt += ' middleware=OSG \n' |
318 |
+ |
txt += ' echo "SyncCE=`echo $EDG_WL_LOG_DESTINATION`" | tee -a $RUNTIME_AREA/$repo \n' |
319 |
+ |
txt += ' echo "GridFlavour=`echo $middleware`" | tee -a $RUNTIME_AREA/$repo \n' |
320 |
|
txt += ' echo "middleware =$middleware" \n' |
321 |
|
txt += 'elif [ $OSG_APP ]; then \n' |
322 |
|
txt += ' middleware=OSG \n' |
323 |
+ |
txt += ' echo "SyncCE=`echo $EDG_WL_LOG_DESTINATION`" | tee -a $RUNTIME_AREA/$repo \n' |
324 |
+ |
txt += ' echo "GridFlavour=`echo $middleware`" | tee -a $RUNTIME_AREA/$repo \n' |
325 |
+ |
txt += ' echo "middleware =$middleware" \n' |
326 |
+ |
txt += 'elif [ $VO_CMS_SW_DIR ]; then \n' |
327 |
+ |
txt += ' middleware=LCG \n' |
328 |
+ |
txt += ' echo "SyncCE=`edg-brokerinfo getCE`" | tee -a $RUNTIME_AREA/$repo \n' |
329 |
+ |
txt += ' echo "GridFlavour=`echo $middleware`" | tee -a $RUNTIME_AREA/$repo \n' |
330 |
|
txt += ' echo "middleware =$middleware" \n' |
331 |
|
txt += 'else \n' |
332 |
< |
txt += ' echo "SET_CMS_ENV 1 ==> middleware not identified" \n' |
333 |
< |
txt += ' echo "JOB_EXIT_STATUS = 1"\n' |
334 |
< |
txt += ' exit 1\n' |
335 |
< |
txt += 'fi\n' |
336 |
< |
|
332 |
> |
txt += ' echo "SET_CMS_ENV 10030 ==> middleware not identified" \n' |
333 |
> |
txt += ' echo "JOB_EXIT_STATUS = 10030" \n' |
334 |
> |
txt += ' echo "JobExitCode=10030" | tee -a $RUNTIME_AREA/$repo \n' |
335 |
> |
txt += ' dumpStatus $RUNTIME_AREA/$repo \n' |
336 |
> |
txt += ' rm -f $RUNTIME_AREA/$repo \n' |
337 |
> |
txt += ' echo "MonitorJobID=`echo $MonitorJobID`" | tee -a $RUNTIME_AREA/$repo \n' |
338 |
> |
txt += ' echo "MonitorID=`echo $MonitorID`" | tee -a $RUNTIME_AREA/$repo\n' |
339 |
> |
txt += ' exit 1 \n' |
340 |
> |
txt += 'fi \n' |
341 |
> |
|
342 |
> |
txt += '# report first time to DashBoard \n' |
343 |
> |
txt += 'dumpStatus $RUNTIME_AREA/$repo \n' |
344 |
> |
txt += 'rm -f $RUNTIME_AREA/$repo \n' |
345 |
> |
txt += 'echo "MonitorJobID=`echo $MonitorJobID`" | tee -a $RUNTIME_AREA/$repo \n' |
346 |
> |
txt += 'echo "MonitorID=`echo $MonitorID`" | tee -a $RUNTIME_AREA/$repo\n' |
347 |
> |
|
348 |
|
txt += '\n\n' |
349 |
|
|
350 |
< |
txt += 'if [ $middleware == LCG ]; then \n' |
351 |
< |
txt += ' echo "SyncGridJobId=`echo $EDG_WL_JOBID`" | tee -a $RUNTIME_AREA/$repo\n' |
352 |
< |
txt += 'fi\n' |
353 |
< |
|
354 |
< |
if int(self.copy_data) == 1: |
355 |
< |
if self.SE: |
356 |
< |
txt += 'export SE='+self.SE+'\n' |
357 |
< |
txt += 'echo "SE = $SE"\n' |
204 |
< |
if self.SE_PATH: |
205 |
< |
if ( self.SE_PATH[-1] != '/' ) : self.SE_PATH = self.SE_PATH + '/' |
206 |
< |
txt += 'export SE_PATH='+self.SE_PATH+'\n' |
207 |
< |
txt += 'echo "SE_PATH = $SE_PATH"\n' |
350 |
> |
# if int(self.copy_data) == 1: |
351 |
> |
# if self.SE: |
352 |
> |
# txt += 'export SE='+self.SE+'\n' |
353 |
> |
# txt += 'echo "SE = $SE"\n' |
354 |
> |
# if self.SE_PATH: |
355 |
> |
# if ( self.SE_PATH[-1] != '/' ) : self.SE_PATH = self.SE_PATH + '/' |
356 |
> |
# txt += 'export SE_PATH='+self.SE_PATH+'\n' |
357 |
> |
# txt += 'echo "SE_PATH = $SE_PATH"\n' |
358 |
|
|
359 |
|
txt += 'export VO='+self.VO+'\n' |
360 |
< |
### FEDE: add some line for LFC catalog setting |
360 |
> |
### add some line for LFC catalog setting |
361 |
|
txt += 'if [ $middleware == LCG ]; then \n' |
362 |
|
txt += ' if [[ $LCG_CATALOG_TYPE != \''+self.lcg_catalog_type+'\' ]]; then\n' |
363 |
|
txt += ' export LCG_CATALOG_TYPE='+self.lcg_catalog_type+'\n' |
406 |
|
txt += ' if [ $OSG_JOB_CONTACT ]; then \n' |
407 |
|
txt += ' CE=`echo $OSG_JOB_CONTACT | /usr/bin/awk -F\/ \'{print $1}\'` \n' |
408 |
|
txt += ' else \n' |
409 |
< |
txt += ' echo "SET_ENV 1 ==> ERROR in setting CE name - OSG mode -" \n' |
409 |
> |
txt += ' echo "SET_CMS_ENV 10099 ==> OSG mode: ERROR in setting CE name from OSG_JOB_CONTACT" \n' |
410 |
> |
txt += ' echo "JOB_EXIT_STATUS = 10099" \n' |
411 |
> |
txt += ' echo "JobExitCode=10099" | tee -a $RUNTIME_AREA/$repo \n' |
412 |
> |
txt += ' dumpStatus $RUNTIME_AREA/$repo \n' |
413 |
> |
txt += ' rm -f $RUNTIME_AREA/$repo \n' |
414 |
> |
txt += ' echo "MonitorJobID=`echo $MonitorJobID`" | tee -a $RUNTIME_AREA/$repo \n' |
415 |
> |
txt += ' echo "MonitorID=`echo $MonitorID`" | tee -a $RUNTIME_AREA/$repo\n' |
416 |
|
txt += ' exit 1 \n' |
417 |
|
txt += ' fi \n' |
418 |
|
txt += 'fi \n' |
424 |
|
Copy input data from SE to WN |
425 |
|
""" |
426 |
|
txt = '' |
427 |
< |
try: |
428 |
< |
self.copy_input_data = common.analisys_common_info['copy_input_data'] |
273 |
< |
#print "self.copy_input_data = ", self.copy_input_data |
274 |
< |
except KeyError: self.copy_input_data = 0 |
275 |
< |
if int(self.copy_input_data) == 1: |
427 |
> |
if not self.copy_input_data: return txt |
428 |
> |
|
429 |
|
## OLI_Daniele deactivate for OSG (wait for LCG UI installed on OSG) |
430 |
< |
txt += 'if [ $middleware == OSG ]; then\n' |
431 |
< |
txt += ' #\n' |
432 |
< |
txt += ' # Copy Input Data from SE to this WN deactivated in OSG mode\n' |
433 |
< |
txt += ' #\n' |
434 |
< |
txt += ' echo "Copy Input Data from SE to this WN deactivated in OSG mode"\n' |
435 |
< |
txt += 'elif [ $middleware == LCG ]; then \n' |
436 |
< |
txt += ' #\n' |
437 |
< |
txt += ' # Copy Input Data from SE to this WN\n' |
438 |
< |
txt += ' #\n' |
439 |
< |
### changed by georgia (put a loop copying more than one input files per jobs) |
440 |
< |
txt += ' for input_file in $cur_file_list \n' |
441 |
< |
txt += ' do \n' |
442 |
< |
txt += ' lcg-cp --vo $VO lfn:$input_lfn/$input_file file:`pwd`/$input_file 2>&1\n' |
443 |
< |
txt += ' copy_input_exit_status=$?\n' |
444 |
< |
txt += ' echo "COPY_INPUT_EXIT_STATUS = $copy_input_exit_status"\n' |
445 |
< |
txt += ' if [ $copy_input_exit_status -ne 0 ]; then \n' |
446 |
< |
txt += ' echo "Problems with copying to WN" \n' |
447 |
< |
txt += ' else \n' |
448 |
< |
txt += ' echo "input copied into WN" \n' |
449 |
< |
txt += ' fi \n' |
450 |
< |
txt += ' done \n' |
451 |
< |
### copy a set of PU ntuples (same for each jobs -- but accessed randomly) |
452 |
< |
txt += ' for file in $cur_pu_list \n' |
453 |
< |
txt += ' do \n' |
454 |
< |
txt += ' lcg-cp --vo $VO lfn:$pu_lfn/$file file:`pwd`/$file 2>&1\n' |
455 |
< |
txt += ' copy_input_exit_status=$?\n' |
456 |
< |
txt += ' echo "COPY_INPUT_PU_EXIT_STATUS = $copy_input_pu_exit_status"\n' |
457 |
< |
txt += ' if [ $copy_input_pu_exit_status -ne 0 ]; then \n' |
458 |
< |
txt += ' echo "Problems with copying pu to WN" \n' |
459 |
< |
txt += ' else \n' |
460 |
< |
txt += ' echo "input pu files copied into WN" \n' |
461 |
< |
txt += ' fi \n' |
462 |
< |
txt += ' done \n' |
463 |
< |
txt += ' \n' |
464 |
< |
txt += ' ### Check SCRATCH space available on WN : \n' |
465 |
< |
txt += ' df -h \n' |
466 |
< |
txt += 'fi \n' |
430 |
> |
txt += 'if [ $middleware == OSG ]; then\n' |
431 |
> |
txt += ' #\n' |
432 |
> |
txt += ' # Copy Input Data from SE to this WN deactivated in OSG mode\n' |
433 |
> |
txt += ' #\n' |
434 |
> |
txt += ' echo "Copy Input Data from SE to this WN deactivated in OSG mode"\n' |
435 |
> |
txt += 'elif [ $middleware == LCG ]; then \n' |
436 |
> |
txt += ' #\n' |
437 |
> |
txt += ' # Copy Input Data from SE to this WN\n' |
438 |
> |
txt += ' #\n' |
439 |
> |
### changed by georgia (put a loop copying more than one input files per jobs) |
440 |
> |
txt += ' for input_file in $cur_file_list \n' |
441 |
> |
txt += ' do \n' |
442 |
> |
txt += ' lcg-cp --vo $VO --verbose -t 1200 lfn:$input_lfn/$input_file file:`pwd`/$input_file 2>&1\n' |
443 |
> |
txt += ' copy_input_exit_status=$?\n' |
444 |
> |
txt += ' echo "COPY_INPUT_EXIT_STATUS = $copy_input_exit_status"\n' |
445 |
> |
txt += ' if [ $copy_input_exit_status -ne 0 ]; then \n' |
446 |
> |
txt += ' echo "Problems with copying to WN" \n' |
447 |
> |
txt += ' else \n' |
448 |
> |
txt += ' echo "input copied into WN" \n' |
449 |
> |
txt += ' fi \n' |
450 |
> |
txt += ' done \n' |
451 |
> |
### copy a set of PU ntuples (same for each jobs -- but accessed randomly) |
452 |
> |
txt += ' for file in $cur_pu_list \n' |
453 |
> |
txt += ' do \n' |
454 |
> |
txt += ' lcg-cp --vo $VO --verbose -t 1200 lfn:$pu_lfn/$file file:`pwd`/$file 2>&1\n' |
455 |
> |
txt += ' copy_input_pu_exit_status=$?\n' |
456 |
> |
txt += ' echo "COPY_INPUT_PU_EXIT_STATUS = $copy_input_pu_exit_status"\n' |
457 |
> |
txt += ' if [ $copy_input_pu_exit_status -ne 0 ]; then \n' |
458 |
> |
txt += ' echo "Problems with copying pu to WN" \n' |
459 |
> |
txt += ' else \n' |
460 |
> |
txt += ' echo "input pu files copied into WN" \n' |
461 |
> |
txt += ' fi \n' |
462 |
> |
txt += ' done \n' |
463 |
> |
txt += ' \n' |
464 |
> |
txt += ' ### Check SCRATCH space available on WN : \n' |
465 |
> |
txt += ' df -h \n' |
466 |
> |
txt += 'fi \n' |
467 |
|
|
468 |
|
return txt |
469 |
|
|
473 |
|
to copy produced output into a storage element. |
474 |
|
""" |
475 |
|
txt = '' |
476 |
+ |
|
477 |
+ |
##### FEDE MOVED FROM SET_ENVIRONMENT ############## |
478 |
+ |
|
479 |
+ |
SE_PATH='' |
480 |
|
if int(self.copy_data) == 1: |
481 |
+ |
if self.SE: |
482 |
+ |
txt += 'export SE='+self.SE+'\n' |
483 |
+ |
txt += 'echo "SE = $SE"\n' |
484 |
+ |
if self.SE_PATH: |
485 |
+ |
if ( self.SE_PATH[-1] != '/' ) : self.SE_PATH = self.SE_PATH + '/' |
486 |
+ |
SE_PATH=self.SE_PATH |
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 |
+ |
#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' |
497 |
+ |
txt += 'echo "SE_PATH = $SE_PATH"\n' |
498 |
+ |
|
499 |
+ |
########################################################## |
500 |
+ |
|
501 |
+ |
#if int(self.copy_data) == 1: |
502 |
|
txt += '#\n' |
503 |
|
txt += '# Copy output to SE = $SE\n' |
504 |
|
txt += '#\n' |
505 |
< |
txt += 'if [ $exe_result -eq 0 ]; then\n' |
505 |
> |
txt += ' if [ $middleware == OSG ]; then\n' |
506 |
> |
txt += ' echo "X509_USER_PROXY = $X509_USER_PROXY"\n' |
507 |
> |
txt += ' echo "source $OSG_APP/glite/setup_glite_ui.sh"\n' |
508 |
> |
txt += ' source $OSG_APP/glite/setup_glite_ui.sh\n' |
509 |
> |
txt += ' export X509_CERT_DIR=$OSG_APP/glite/etc/grid-security/certificates\n' |
510 |
> |
txt += ' echo "export X509_CERT_DIR=$X509_CERT_DIR"\n' |
511 |
> |
txt += ' fi \n' |
512 |
> |
|
513 |
|
txt += ' for out_file in $file_list ; do\n' |
514 |
< |
txt += ' echo "Trying to copy output file to $SE "\n' |
515 |
< |
## OLI_Daniele globus-* for OSG, lcg-* for LCG |
516 |
< |
txt += ' if [ $middleware == OSG ]; then\n' |
517 |
< |
txt += ' echo "globus-url-copy file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n' |
518 |
< |
txt += ' copy_exit_status=`globus-url-copy file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n' |
519 |
< |
#txt += ' exitstring=`globus-url-copy file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n' |
520 |
< |
txt += ' elif [ $middleware == LCG ]; then \n' |
521 |
< |
txt += ' echo "lcg-cp --vo cms -t 1200 file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n' |
522 |
< |
txt += ' copy_exit_status=`lcg-cp --vo cms -t 1200 file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n' |
523 |
< |
#txt += ' exitstring=`lcg-cp --vo cms -t 30 file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n' |
524 |
< |
txt += ' fi \n' |
525 |
< |
#txt += ' copy_exit_status=$?\n' |
341 |
< |
txt += ' echo "COPY_EXIT_STATUS = $copy_exit_status"\n' |
514 |
> |
txt += ' echo "Trying to copy output file to $SE using srmcp"\n' |
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' |
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' |
523 |
> |
txt += ' fi \n' |
524 |
> |
txt += ' copy_exit_status=$?\n' |
525 |
> |
txt += ' echo "COPY_EXIT_STATUS for srmcp = $copy_exit_status"\n' |
526 |
|
txt += ' echo "STAGE_OUT = $copy_exit_status"\n' |
527 |
+ |
|
528 |
|
txt += ' if [ $copy_exit_status -ne 0 ]; then\n' |
529 |
< |
txt += ' echo "Problems with SE = $SE"\n' |
529 |
> |
txt += ' echo "Possible problem with SE = $SE"\n' |
530 |
|
txt += ' echo "StageOutExitStatus = 198" | tee -a $RUNTIME_AREA/$repo\n' |
531 |
|
txt += ' echo "StageOutExitStatusReason = $exitstring" | tee -a $RUNTIME_AREA/$repo\n' |
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' |
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' |
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' |
547 |
+ |
|
548 |
+ |
txt += ' if [ $copy_exit_status -ne 0 ]; then\n' |
549 |
+ |
txt += ' echo "Problems with SE = $SE"\n' |
550 |
+ |
txt += ' echo "StageOutExitStatus = 198" | tee -a $RUNTIME_AREA/$repo\n' |
551 |
+ |
txt += ' echo "StageOutExitStatusReason = $exitstring" | tee -a $RUNTIME_AREA/$repo\n' |
552 |
+ |
txt += ' echo "srmcp and lcg-cp and failed!"\n' |
553 |
+ |
txt += ' SE=""\n' |
554 |
+ |
txt += ' echo "SE = $SE"\n' |
555 |
+ |
txt += ' SE_PATH=""\n' |
556 |
+ |
txt += ' echo "SE_PATH = $SE_PATH"\n' |
557 |
+ |
txt += ' else\n' |
558 |
+ |
txt += ' echo "StageOutSE = $SE" | tee -a $RUNTIME_AREA/$repo\n' |
559 |
+ |
txt += ' echo "StageOutCatalog = " | tee -a $RUNTIME_AREA/$repo\n' |
560 |
+ |
txt += ' echo "output copied into $SE/$SE_PATH directory"\n' |
561 |
+ |
txt += ' echo "StageOutExitStatus = 0" | tee -a $RUNTIME_AREA/$repo\n' |
562 |
+ |
txt += ' echo "lcg-cp succeeded"\n' |
563 |
+ |
txt += ' fi\n' |
564 |
|
txt += ' else\n' |
565 |
|
txt += ' echo "StageOutSE = $SE" | tee -a $RUNTIME_AREA/$repo\n' |
566 |
|
txt += ' echo "StageOutCatalog = " | tee -a $RUNTIME_AREA/$repo\n' |
567 |
|
txt += ' echo "output copied into $SE/$SE_PATH directory"\n' |
568 |
|
txt += ' echo "StageOutExitStatus = 0" | tee -a $RUNTIME_AREA/$repo\n' |
569 |
+ |
txt += ' echo "srmcp succeeded"\n' |
570 |
|
txt += ' fi\n' |
571 |
|
txt += ' done\n' |
572 |
< |
txt += 'fi\n' |
572 |
> |
txt += ' exit_status=$copy_exit_status\n' |
573 |
|
return txt |
574 |
|
|
575 |
|
def wsRegisterOutput(self): |
589 |
|
txt += '#\n' |
590 |
|
txt += '# Register output to LFC\n' |
591 |
|
txt += '#\n' |
592 |
< |
txt += ' if [[ $exe_result -eq 0 && $copy_exit_status -eq 0 ]]; then\n' |
592 |
> |
txt += ' if [ $copy_exit_status -eq 0 ]; then\n' |
593 |
|
txt += ' for out_file in $file_list ; do\n' |
594 |
|
txt += ' echo "Trying to register the output file into LFC"\n' |
595 |
< |
txt += ' echo "lcg-rf -l $LFN/$out_file --vo $VO sfn://$SE$SE_PATH/$out_file"\n' |
596 |
< |
txt += ' lcg-rf -l $LFN/$out_file --vo $VO sfn://$SE$SE_PATH/$out_file 2>&1 \n' |
595 |
> |
txt += ' echo "lcg-rf -l $LFN/$out_file --vo $VO -t 1200 sfn://$SE$SE_PATH/$out_file 2>&1"\n' |
596 |
> |
txt += ' lcg-rf -l $LFN/$out_file --vo $VO -t 1200 sfn://$SE$SE_PATH/$out_file 2>&1 \n' |
597 |
|
txt += ' register_exit_status=$?\n' |
598 |
|
txt += ' echo "REGISTER_EXIT_STATUS = $register_exit_status"\n' |
599 |
|
txt += ' echo "STAGE_OUT = $register_exit_status"\n' |
600 |
|
txt += ' if [ $register_exit_status -ne 0 ]; then \n' |
601 |
|
txt += ' echo "Problems with the registration to LFC" \n' |
602 |
|
txt += ' echo "Try with srm protocol" \n' |
603 |
< |
txt += ' echo "lcg-rf -l $LFN/$out_file --vo $VO srm://$SE$SE_PATH/$out_file"\n' |
604 |
< |
txt += ' lcg-rf -l $LFN/$out_file --vo $VO srm://$SE$SE_PATH/$out_file 2>&1 \n' |
603 |
> |
txt += ' echo "lcg-rf -l $LFN/$out_file --vo $VO -t 1200 srm://$SE$SE_PATH/$out_file 2>&1"\n' |
604 |
> |
txt += ' lcg-rf -l $LFN/$out_file --vo $VO -t 1200 srm://$SE$SE_PATH/$out_file 2>&1 \n' |
605 |
|
txt += ' register_exit_status=$?\n' |
606 |
|
txt += ' echo "REGISTER_EXIT_STATUS = $register_exit_status"\n' |
607 |
|
txt += ' echo "STAGE_OUT = $register_exit_status"\n' |
613 |
|
txt += ' fi \n' |
614 |
|
txt += ' echo "StageOutExitStatus = $register_exit_status" | tee -a $RUNTIME_AREA/$repo\n' |
615 |
|
txt += ' done\n' |
616 |
< |
txt += ' elif [[ $exe_result -eq 0 && $copy_exit_status -ne 0 ]]; then \n' |
616 |
> |
txt += ' else \n' |
617 |
|
txt += ' echo "Trying to copy output file to CloseSE"\n' |
618 |
|
txt += ' CLOSE_SE=`edg-brokerinfo getCloseSEs | head -1`\n' |
619 |
|
txt += ' for out_file in $file_list ; do\n' |
620 |
< |
txt += ' echo "lcg-cr -v -l lfn:${LFN}/$out_file -d $CLOSE_SE -P $LFN/$out_file --vo $VO file://`pwd`/$out_file" \n' |
621 |
< |
txt += ' lcg-cr -v -l lfn:${LFN}/$out_file -d $CLOSE_SE -P $LFN/$out_file --vo $VO file://`pwd`/$out_file 2>&1 \n' |
620 |
> |
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' |
621 |
> |
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' |
622 |
|
txt += ' register_exit_status=$?\n' |
623 |
|
txt += ' echo "REGISTER_EXIT_STATUS = $register_exit_status"\n' |
624 |
|
txt += ' echo "STAGE_OUT = $register_exit_status"\n' |
625 |
|
txt += ' if [ $register_exit_status -ne 0 ]; then \n' |
626 |
< |
txt += ' echo "Problems with CloseSE" \n' |
626 |
> |
txt += ' echo "Problems with CloseSE or Catalog" \n' |
627 |
|
txt += ' else \n' |
628 |
|
txt += ' echo "The program was successfully executed"\n' |
629 |
|
txt += ' echo "SE = $CLOSE_SE"\n' |
631 |
|
txt += ' fi \n' |
632 |
|
txt += ' echo "StageOutExitStatus = $register_exit_status" | tee -a $RUNTIME_AREA/$repo\n' |
633 |
|
txt += ' done\n' |
416 |
– |
txt += ' else\n' |
417 |
– |
txt += ' echo "Problem with the executable"\n' |
634 |
|
txt += ' fi \n' |
635 |
+ |
txt += ' exit_status=$register_exit_status\n' |
636 |
|
txt += 'fi \n' |
637 |
|
return txt |
638 |
|
|
642 |
|
""" |
643 |
|
self.checkProxy() |
644 |
|
cmd = 'edg-job-get-logging-info -v 2 ' + id |
428 |
– |
#cmd_out = os.popen(cmd) |
645 |
|
cmd_out = runCommand(cmd) |
646 |
|
return cmd_out |
647 |
|
|
432 |
– |
def listMatch(self, nj): |
433 |
– |
""" |
434 |
– |
Check the compatibility of available resources |
435 |
– |
""" |
436 |
– |
self.checkProxy() |
437 |
– |
jdl = common.job_list[nj].jdlFilename() |
438 |
– |
cmd = 'edg-job-list-match ' + self.configOpt_() + jdl |
439 |
– |
cmd_out = runCommand(cmd,0,10) |
440 |
– |
if not cmd_out: |
441 |
– |
raise CrabException("ERROR: "+cmd+" failed!") |
442 |
– |
|
443 |
– |
return self.parseListMatch_(cmd_out, jdl) |
444 |
– |
|
445 |
– |
def parseListMatch_(self, out, jdl): |
446 |
– |
""" |
447 |
– |
Parse the f* output of edg-list-match and produce something sensible |
448 |
– |
""" |
449 |
– |
reComment = re.compile( r'^\**$' ) |
450 |
– |
reEmptyLine = re.compile( r'^$' ) |
451 |
– |
reVO = re.compile( r'Selected Virtual Organisation name.*' ) |
452 |
– |
reLine = re.compile( r'.*') |
453 |
– |
reCE = re.compile( r'(.*:.*)') |
454 |
– |
reCEId = re.compile( r'CEId.*') |
455 |
– |
reNO = re.compile( r'No Computing Element matching' ) |
456 |
– |
reRB = re.compile( r'Connecting to host' ) |
457 |
– |
next = 0 |
458 |
– |
CEs=[] |
459 |
– |
Match=0 |
460 |
– |
|
461 |
– |
#print out |
462 |
– |
lines = reLine.findall(out) |
463 |
– |
|
464 |
– |
i=0 |
465 |
– |
CEs=[] |
466 |
– |
for line in lines: |
467 |
– |
string.strip(line) |
468 |
– |
#print line |
469 |
– |
if reNO.match( line ): |
470 |
– |
common.logger.debug(5,line) |
471 |
– |
return 0 |
472 |
– |
pass |
473 |
– |
if reVO.match( line ): |
474 |
– |
VO =reVO.match( line ).group() |
475 |
– |
common.logger.debug(5,"VO "+VO) |
476 |
– |
pass |
477 |
– |
|
478 |
– |
if reRB.match( line ): |
479 |
– |
RB = reRB.match(line).group() |
480 |
– |
common.logger.debug(5,"RB "+RB) |
481 |
– |
pass |
482 |
– |
|
483 |
– |
if reCEId.search( line ): |
484 |
– |
for lineCE in lines[i:-1]: |
485 |
– |
if reCE.match( lineCE ): |
486 |
– |
CE = string.strip(reCE.search(lineCE).group(1)) |
487 |
– |
CEs.append(CE.split(':')[0]) |
488 |
– |
pass |
489 |
– |
pass |
490 |
– |
pass |
491 |
– |
i=i+1 |
492 |
– |
pass |
493 |
– |
|
494 |
– |
common.logger.debug(5,"All CE :"+str(CEs)) |
495 |
– |
|
496 |
– |
sites = [] |
497 |
– |
[sites.append(it) for it in CEs if not sites.count(it)] |
498 |
– |
|
499 |
– |
common.logger.debug(5,"All Sites :"+str(sites)) |
500 |
– |
return len(sites) |
501 |
– |
|
502 |
– |
def noMatchFound_(self, jdl): |
503 |
– |
reReq = re.compile( r'Requirements' ) |
504 |
– |
reString = re.compile( r'"\S*"' ) |
505 |
– |
f = file(jdl,'r') |
506 |
– |
for line in f.readlines(): |
507 |
– |
line= line.strip() |
508 |
– |
if reReq.match(line): |
509 |
– |
for req in reString.findall(line): |
510 |
– |
if re.search("VO",req): |
511 |
– |
common.logger.message( "SW required: "+req) |
512 |
– |
continue |
513 |
– |
if re.search('"\d+',req): |
514 |
– |
common.logger.message("Other req : "+req) |
515 |
– |
continue |
516 |
– |
common.logger.message( "CE required: "+req) |
517 |
– |
break |
518 |
– |
pass |
519 |
– |
raise CrabException("No compatible resources found!") |
520 |
– |
|
521 |
– |
def submit(self, nj): |
522 |
– |
""" |
523 |
– |
Submit one EDG job. |
524 |
– |
""" |
525 |
– |
|
526 |
– |
self.checkProxy() |
527 |
– |
jid = None |
528 |
– |
jdl = common.job_list[nj].jdlFilename() |
529 |
– |
|
530 |
– |
cmd = 'edg-job-submit ' + self.configOpt_() + jdl |
531 |
– |
cmd_out = runCommand(cmd) |
532 |
– |
if cmd_out != None: |
533 |
– |
reSid = re.compile( r'https.+' ) |
534 |
– |
jid = reSid.search(cmd_out).group() |
535 |
– |
pass |
536 |
– |
return jid |
537 |
– |
|
538 |
– |
def resubmit(self, nj_list): |
539 |
– |
""" |
540 |
– |
Prepare jobs to be submit |
541 |
– |
""" |
542 |
– |
return |
543 |
– |
|
544 |
– |
def getExitStatus(self, id): |
545 |
– |
return self.getStatusAttribute_(id, 'exit_code') |
546 |
– |
|
547 |
– |
def queryStatus(self, id): |
548 |
– |
return self.getStatusAttribute_(id, 'status') |
549 |
– |
|
550 |
– |
def queryDest(self, id): |
551 |
– |
return self.getStatusAttribute_(id, 'destination') |
552 |
– |
|
553 |
– |
|
554 |
– |
def getStatusAttribute_(self, id, attr): |
555 |
– |
""" Query a status of the job with id """ |
556 |
– |
|
557 |
– |
self.checkProxy() |
558 |
– |
hstates = {} |
559 |
– |
Status = importName('edg_wl_userinterface_common_LbWrapper', 'Status') |
560 |
– |
# Bypass edg-job-status interfacing directly to C++ API |
561 |
– |
# Job attribute vector to retrieve status without edg-job-status |
562 |
– |
level = 0 |
563 |
– |
# Instance of the Status class provided by LB API |
564 |
– |
jobStat = Status() |
565 |
– |
st = 0 |
566 |
– |
jobStat.getStatus(id, level) |
567 |
– |
err, apiMsg = jobStat.get_error() |
568 |
– |
if err: |
569 |
– |
common.logger.debug(5,'Error caught' + apiMsg) |
570 |
– |
return None |
571 |
– |
else: |
572 |
– |
for i in range(len(self.states)): |
573 |
– |
# Fill an hash table with all information retrieved from LB API |
574 |
– |
hstates[ self.states[i] ] = jobStat.loadStatus(st)[i] |
575 |
– |
result = jobStat.loadStatus(st)[ self.states.index(attr) ] |
576 |
– |
return result |
577 |
– |
|
648 |
|
def queryDetailedStatus(self, id): |
649 |
|
""" Query a detailed status of the job with id """ |
650 |
|
cmd = 'edg-job-status '+id |
651 |
|
cmd_out = runCommand(cmd) |
652 |
|
return cmd_out |
653 |
|
|
654 |
< |
def getOutput(self, id): |
654 |
> |
def findSites_(self, n): |
655 |
> |
itr4 =[] |
656 |
> |
sites = common.jobDB.destination(n) |
657 |
> |
if len(sites)>0 and sites[0]=="Any": |
658 |
> |
return itr4 |
659 |
> |
itr = '' |
660 |
> |
if sites != [""]:#CarlosDaniele |
661 |
> |
for site in sites: |
662 |
> |
#itr = itr + 'target.GlueSEUniqueID=="'+site+'" || ' |
663 |
> |
itr = itr + 'target.GlueSEUniqueID=="'+site+'" || ' |
664 |
> |
itr = itr[0:-4] |
665 |
> |
itr4.append( itr ) |
666 |
> |
return itr4 |
667 |
> |
|
668 |
> |
def createXMLSchScript(self, nj, argsList): |
669 |
> |
|
670 |
|
""" |
671 |
< |
Get output for a finished job with id. |
587 |
< |
Returns the name of directory with results. |
671 |
> |
Create a XML-file for BOSS4. |
672 |
|
""" |
673 |
< |
|
590 |
< |
self.checkProxy() |
591 |
< |
cmd = 'edg-job-get-output --dir ' + common.work_space.resDir() + ' ' + id |
592 |
< |
cmd_out = runCommand(cmd) |
593 |
< |
|
594 |
< |
# Determine the output directory name |
595 |
< |
dir = common.work_space.resDir() |
596 |
< |
dir += os.environ['USER'] |
597 |
< |
dir += '_' + os.path.basename(id) |
598 |
< |
return dir |
599 |
< |
|
600 |
< |
def cancel(self, id): |
601 |
< |
""" Cancel the EDG job with id """ |
602 |
< |
self.checkProxy() |
603 |
< |
cmd = 'edg-job-cancel --noint ' + id |
604 |
< |
cmd_out = runCommand(cmd) |
605 |
< |
return cmd_out |
606 |
< |
|
607 |
< |
def createSchScript(self, nj): |
673 |
> |
# job = common.job_list[nj] |
674 |
|
""" |
675 |
< |
Create a JDL-file for EDG. |
675 |
> |
INDY |
676 |
> |
[begin] FIX-ME: |
677 |
> |
I would pass jobType instead of job |
678 |
|
""" |
679 |
< |
|
680 |
< |
job = common.job_list[nj] |
679 |
> |
index = nj - 1 |
680 |
> |
job = common.job_list[index] |
681 |
|
jbt = job.type() |
614 |
– |
inp_sandbox = jbt.inputSandbox(nj) |
615 |
– |
out_sandbox = jbt.outputSandbox(nj) |
616 |
– |
inp_storage_subdir = '' |
682 |
|
|
683 |
< |
title = '# This JDL was generated by '+\ |
684 |
< |
common.prog_name+' (version '+common.prog_version_str+')\n' |
685 |
< |
jt_string = '' |
686 |
< |
|
687 |
< |
|
623 |
< |
|
624 |
< |
SPL = inp_storage_subdir |
625 |
< |
if ( SPL and SPL[-1] != '/' ) : SPL = SPL + '/' |
626 |
< |
|
627 |
< |
jdl_fname = job.jdlFilename() |
628 |
< |
jdl = open(jdl_fname, 'w') |
629 |
< |
jdl.write(title) |
630 |
< |
|
631 |
< |
script = job.scriptFilename() |
632 |
< |
jdl.write('Executable = "' + os.path.basename(script) +'";\n') |
633 |
< |
jdl.write(jt_string) |
634 |
< |
|
635 |
< |
### only one .sh JDL has arguments: |
636 |
< |
firstEvent = common.jobDB.firstEvent(nj) |
637 |
< |
maxEvents = common.jobDB.maxEvents(nj) |
638 |
< |
jdl.write('Arguments = "' + str(nj+1)+' '+str(firstEvent)+' '+str(maxEvents)+'";\n') |
639 |
< |
|
640 |
< |
inp_box = 'InputSandbox = { ' |
641 |
< |
inp_box = inp_box + '"' + script + '",' |
642 |
< |
|
643 |
< |
if inp_sandbox != None: |
644 |
< |
for fl in inp_sandbox: |
645 |
< |
inp_box = inp_box + ' "' + fl + '",' |
646 |
< |
pass |
647 |
< |
pass |
648 |
< |
|
649 |
< |
#if common.use_jam: |
650 |
< |
# inp_box = inp_box+' "'+common.bin_dir+'/'+common.run_jam+'",' |
651 |
< |
|
652 |
< |
# Marco (VERY TEMPORARY ML STUFF) |
653 |
< |
inp_box = inp_box+' "' + os.path.abspath(os.environ['CRABDIR']+'/python/'+'report.py') + '", "' +\ |
654 |
< |
os.path.abspath(os.environ['CRABDIR']+'/python/'+'DashboardAPI.py') + '", "'+\ |
655 |
< |
os.path.abspath(os.environ['CRABDIR']+'/python/'+'Logger.py') + '", "'+\ |
656 |
< |
os.path.abspath(os.environ['CRABDIR']+'/python/'+'ProcInfo.py') + '", "'+\ |
657 |
< |
os.path.abspath(os.environ['CRABDIR']+'/python/'+'apmon.py') + '"' |
658 |
< |
# End Marco |
659 |
< |
|
660 |
< |
if (not jbt.additional_inbox_files == []): |
661 |
< |
inp_box = inp_box + ', ' |
662 |
< |
for addFile in jbt.additional_inbox_files: |
663 |
< |
addFile = os.path.abspath(addFile) |
664 |
< |
inp_box = inp_box+' "'+addFile+'",' |
665 |
< |
pass |
666 |
< |
|
667 |
< |
if inp_box[-1] == ',' : inp_box = inp_box[:-1] |
668 |
< |
inp_box = inp_box + ' };\n' |
669 |
< |
jdl.write(inp_box) |
683 |
> |
inp_sandbox = jbt.inputSandbox(index) |
684 |
> |
#out_sandbox = jbt.outputSandbox(index) |
685 |
> |
""" |
686 |
> |
[end] FIX-ME |
687 |
> |
""" |
688 |
|
|
671 |
– |
jdl.write('StdOutput = "' + job.stdout() + '";\n') |
672 |
– |
jdl.write('StdError = "' + job.stderr() + '";\n') |
689 |
|
|
690 |
+ |
title = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n' |
691 |
+ |
jt_string = '' |
692 |
|
|
693 |
< |
if job.stdout() == job.stderr(): |
694 |
< |
out_box = 'OutputSandbox = { "' + \ |
677 |
< |
job.stdout() + '", ".BrokerInfo",' |
678 |
< |
else: |
679 |
< |
out_box = 'OutputSandbox = { "' + \ |
680 |
< |
job.stdout() + '", "' + \ |
681 |
< |
job.stderr() + '", ".BrokerInfo",' |
693 |
> |
xml_fname = str(self.jobtypeName)+'.xml' |
694 |
> |
xml = open(common.work_space.shareDir()+'/'+xml_fname, 'a') |
695 |
|
|
696 |
< |
if int(self.return_data) == 1: |
697 |
< |
if out_sandbox != None: |
698 |
< |
for fl in out_sandbox: |
699 |
< |
out_box = out_box + ' "' + fl + '",' |
700 |
< |
pass |
688 |
< |
pass |
689 |
< |
pass |
690 |
< |
|
691 |
< |
if out_box[-1] == ',' : out_box = out_box[:-1] |
692 |
< |
out_box = out_box + ' };' |
693 |
< |
jdl.write(out_box+'\n') |
696 |
> |
#TaskName |
697 |
> |
dir = string.split(common.work_space.topDir(), '/') |
698 |
> |
taskName = dir[len(dir)-2] |
699 |
> |
|
700 |
> |
to_write = '' |
701 |
|
|
702 |
< |
|
696 |
< |
req='Requirements = ' |
702 |
> |
req=' ' |
703 |
|
req = req + jbt.getRequirements() |
704 |
< |
# ### if at least a CE exists ... |
699 |
< |
# if common.analisys_common_info['sites']: |
700 |
< |
# if common.analisys_common_info['sw_version']: |
701 |
< |
# req='Requirements = ' |
702 |
< |
# req=req + 'Member("VO-cms-' + \ |
703 |
< |
# common.analisys_common_info['sw_version'] + \ |
704 |
< |
# '", other.GlueHostApplicationSoftwareRunTimeEnvironment)' |
705 |
< |
# if len(common.analisys_common_info['sites'])>0: |
706 |
< |
# req = req + ' && (' |
707 |
< |
# for i in range(len(common.analisys_common_info['sites'])): |
708 |
< |
# req = req + 'other.GlueCEInfoHostName == "' \ |
709 |
< |
# + common.analisys_common_info['sites'][i] + '"' |
710 |
< |
# if ( i < (int(len(common.analisys_common_info['sites']) - 1)) ): |
711 |
< |
# req = req + ' || ' |
712 |
< |
# req = req + ')' |
713 |
< |
#### and USER REQUIREMENT |
704 |
> |
|
705 |
|
if self.EDG_requirements: |
706 |
< |
if (req == 'Requirement = '): |
706 |
> |
if (req == ' '): |
707 |
|
req = req + self.EDG_requirements |
708 |
|
else: |
709 |
|
req = req + ' && ' + self.EDG_requirements |
719 |
– |
#### FEDE ##### |
710 |
|
if self.EDG_ce_white_list: |
711 |
|
ce_white_list = string.split(self.EDG_ce_white_list,',') |
722 |
– |
#print "req = ", req |
712 |
|
for i in range(len(ce_white_list)): |
713 |
|
if i == 0: |
714 |
< |
if (req == 'Requirement = '): |
714 |
> |
if (req == ' '): |
715 |
|
req = req + '((RegExp("' + ce_white_list[i] + '", other.GlueCEUniqueId))' |
716 |
|
else: |
717 |
|
req = req + ' && ((RegExp("' + ce_white_list[i] + '", other.GlueCEUniqueId))' |
723 |
|
if self.EDG_ce_black_list: |
724 |
|
ce_black_list = string.split(self.EDG_ce_black_list,',') |
725 |
|
for ce in ce_black_list: |
726 |
< |
if (req == 'Requirement = '): |
726 |
> |
if (req == ' '): |
727 |
|
req = req + '(!RegExp("' + ce + '", other.GlueCEUniqueId))' |
728 |
|
else: |
729 |
|
req = req + ' && (!RegExp("' + ce + '", other.GlueCEUniqueId))' |
730 |
|
pass |
742 |
– |
############### |
731 |
|
if self.EDG_clock_time: |
732 |
< |
if (req == 'Requirement = '): |
732 |
> |
if (req == ' '): |
733 |
|
req = req + 'other.GlueCEPolicyMaxWallClockTime>='+self.EDG_clock_time |
734 |
|
else: |
735 |
|
req = req + ' && other.GlueCEPolicyMaxWallClockTime>='+self.EDG_clock_time |
736 |
|
|
737 |
|
if self.EDG_cpu_time: |
738 |
< |
if (req == 'Requirement = '): |
738 |
> |
if (req == ' '): |
739 |
|
req = req + ' other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time |
740 |
|
else: |
741 |
|
req = req + ' && other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time |
742 |
< |
if (req != 'Requirement = '): |
755 |
< |
req = req + ';\n' |
756 |
< |
jdl.write(req) |
757 |
< |
|
758 |
< |
jdl.write('VirtualOrganisation = "' + self.VO + '";\n') |
759 |
< |
|
742 |
> |
|
743 |
|
if ( self.EDG_retry_count ): |
744 |
< |
jdl.write('RetryCount = '+self.EDG_retry_count+';\n') |
744 |
> |
to_write = to_write + 'RetryCount = "'+self.EDG_retry_count+'"\n' |
745 |
> |
pass |
746 |
> |
|
747 |
> |
if ( self.EDG_shallow_retry_count ): |
748 |
> |
to_write = to_write + 'ShallowRetryCount = "'+self.EDG_shallow_retry_count+'"\n' |
749 |
> |
pass |
750 |
> |
|
751 |
> |
to_write = to_write + 'MyProxyServer = ""' + self.proxyServer + '""\n' |
752 |
> |
to_write = to_write + 'VirtualOrganisation = ""' + self.VO + '""\n' |
753 |
> |
|
754 |
> |
#TaskName |
755 |
> |
dir = string.split(common.work_space.topDir(), '/') |
756 |
> |
taskName = dir[len(dir)-2] |
757 |
> |
|
758 |
> |
xml.write(str(title)) |
759 |
> |
#xml.write('<task name="' +str(taskName)+'" sub_path="' +common.work_space.pathForTgz() + 'share/.boss_cache">\n') |
760 |
> |
|
761 |
> |
#xml.write('<task name="' +str(taskName)+ '" sub_path="' +common.work_space.pathForTgz() + 'share/.boss_cache"' + '" task_info="' + os.path.expandvars('X509_USER_PROXY') + '">\n') |
762 |
> |
xml.write('<task name="' +str(taskName)+ '" sub_path="' +common.work_space.pathForTgz() + 'share/.boss_cache"' + ' task_info="' + os.environ["X509_USER_PROXY"] + '">\n') |
763 |
> |
xml.write(jt_string) |
764 |
> |
|
765 |
> |
if (to_write != ''): |
766 |
> |
xml.write('<extraTags\n') |
767 |
> |
xml.write(to_write) |
768 |
> |
xml.write('/>\n') |
769 |
> |
pass |
770 |
> |
|
771 |
> |
xml.write('<iterator>\n') |
772 |
> |
xml.write('\t<iteratorRule name="ITR1">\n') |
773 |
> |
xml.write('\t\t<ruleElement> 1:'+ str(nj) + ' </ruleElement>\n') |
774 |
> |
xml.write('\t</iteratorRule>\n') |
775 |
> |
xml.write('\t<iteratorRule name="ITR2">\n') |
776 |
> |
for arg in argsList: |
777 |
> |
xml.write('\t\t<ruleElement> <![CDATA[\n'+ arg + '\n\t\t]]> </ruleElement>\n') |
778 |
> |
pass |
779 |
> |
xml.write('\t</iteratorRule>\n') |
780 |
> |
#print jobList |
781 |
> |
xml.write('\t<iteratorRule name="ITR3">\n') |
782 |
> |
xml.write('\t\t<ruleElement> 1:'+ str(nj) + ':1:6 </ruleElement>\n') |
783 |
> |
xml.write('\t</iteratorRule>\n') |
784 |
> |
|
785 |
> |
''' |
786 |
> |
indy: here itr4 |
787 |
> |
''' |
788 |
> |
|
789 |
> |
xml.write('<chain name="' +str(taskName)+'__ITR1_" scheduler="'+str(self.schedulerName)+'">\n') |
790 |
> |
# xml.write('<chain scheduler="'+str(self.schedulerName)+'">\n') |
791 |
> |
xml.write(jt_string) |
792 |
> |
|
793 |
> |
#executable |
794 |
> |
|
795 |
> |
""" |
796 |
> |
INDY |
797 |
> |
script depends on jobType: it should be probably get in a different way |
798 |
> |
""" |
799 |
> |
script = job.scriptFilename() |
800 |
> |
xml.write('<program>\n') |
801 |
> |
xml.write('<exec> ' + os.path.basename(script) +' </exec>\n') |
802 |
> |
xml.write(jt_string) |
803 |
> |
|
804 |
> |
xml.write('<args> <![CDATA[\n _ITR2_ \n]]> </args>\n') |
805 |
> |
xml.write('<program_types> crabjob </program_types>\n') |
806 |
> |
inp_box = common.work_space.pathForTgz() + 'job/' + jbt.scriptName + ',' |
807 |
> |
|
808 |
> |
if inp_sandbox != None: |
809 |
> |
for fl in inp_sandbox: |
810 |
> |
inp_box = inp_box + '' + fl + ',' |
811 |
> |
pass |
812 |
> |
pass |
813 |
> |
|
814 |
> |
# if (not jbt.additional_inbox_files == []): |
815 |
> |
# inp_box = inp_box + ',' |
816 |
> |
# for addFile in jbt.additional_inbox_files: |
817 |
> |
# #addFile = os.path.abspath(addFile) |
818 |
> |
# inp_box = inp_box+''+addFile+',' |
819 |
> |
# pass |
820 |
> |
|
821 |
> |
if inp_box[-1] == ',' : inp_box = inp_box[:-1] |
822 |
> |
inp_box = '<infiles> <![CDATA[\n' + inp_box + '\n]]> </infiles>\n' |
823 |
> |
xml.write(inp_box) |
824 |
> |
|
825 |
> |
base = jbt.name() |
826 |
> |
stdout = base + '__ITR3_.stdout' |
827 |
> |
stderr = base + '__ITR3_.stderr' |
828 |
> |
|
829 |
> |
xml.write('<stderr> ' + stderr + '</stderr>\n') |
830 |
> |
xml.write('<stdout> ' + stdout + '</stdout>\n') |
831 |
> |
|
832 |
> |
|
833 |
> |
out_box = stdout + ',' + \ |
834 |
> |
stderr + ',.BrokerInfo,' |
835 |
> |
|
836 |
> |
""" |
837 |
> |
if int(self.return_data) == 1: |
838 |
> |
if out_sandbox != None: |
839 |
> |
for fl in out_sandbox: |
840 |
> |
out_box = out_box + '' + fl + ',' |
841 |
> |
pass |
842 |
> |
pass |
843 |
|
pass |
844 |
+ |
""" |
845 |
|
|
846 |
< |
jdl.write('MyProxyServer = "' + self.proxyServer + '";\n') |
846 |
> |
""" |
847 |
> |
INDY |
848 |
> |
something similar should be also done for infiles (if it makes sense!) |
849 |
> |
""" |
850 |
> |
# Stuff to be returned _always_ via sandbox |
851 |
> |
for fl in jbt.output_file_sandbox: |
852 |
> |
out_box = out_box + '' + jbt.numberFile_(fl, '_ITR1_') + ',' |
853 |
> |
pass |
854 |
> |
pass |
855 |
> |
|
856 |
> |
# via sandbox iif required return_data |
857 |
> |
if int(self.return_data) == 1: |
858 |
> |
for fl in jbt.output_file: |
859 |
> |
out_box = out_box + '' + jbt.numberFile_(fl, '_ITR1_') + ',' |
860 |
> |
pass |
861 |
> |
pass |
862 |
> |
|
863 |
> |
if out_box[-1] == ',' : out_box = out_box[:-1] |
864 |
> |
out_box = '<outfiles> <![CDATA[\n' + out_box + '\n]]></outfiles>\n' |
865 |
> |
xml.write(out_box) |
866 |
> |
|
867 |
> |
xml.write('<BossAttr> crabjob.INTERNAL_ID=_ITR1_ </BossAttr>\n') |
868 |
> |
|
869 |
> |
xml.write('</program>\n') |
870 |
> |
xml.write('</chain>\n') |
871 |
> |
|
872 |
> |
xml.write('</iterator>\n') |
873 |
> |
xml.write('</task>\n') |
874 |
> |
|
875 |
> |
xml.close() |
876 |
> |
|
877 |
|
|
766 |
– |
jdl.close() |
878 |
|
return |
879 |
|
|
880 |
|
def checkProxy(self): |
882 |
|
Function to check the Globus proxy. |
883 |
|
""" |
884 |
|
if (self.proxyValid): return |
885 |
< |
timeleft = -999 |
885 |
> |
|
886 |
> |
### Just return if asked to do so |
887 |
> |
if (self.dontCheckProxy==1): |
888 |
> |
self.proxyValid=1 |
889 |
> |
return |
890 |
> |
|
891 |
|
minTimeLeft=10*3600 # in seconds |
892 |
|
|
893 |
|
minTimeLeftServer = 100 # in hours |
894 |
|
|
779 |
– |
#cmd = 'voms-proxy-info -exists -valid '+str(minTimeLeft)+':00' |
780 |
– |
#cmd = 'voms-proxy-info -timeleft' |
895 |
|
mustRenew = 0 |
896 |
< |
timeLeftLocal = runCommand('voms-proxy-info -timeleft') |
896 |
> |
timeLeftLocal = runCommand('voms-proxy-info -timeleft 2>/dev/null') |
897 |
|
timeLeftServer = -999 |
898 |
|
if not timeLeftLocal or int(timeLeftLocal) <= 0 or not isInt(timeLeftLocal): |
899 |
|
mustRenew = 1 |
900 |
|
else: |
901 |
< |
timeLeftServer = runCommand('voms-proxy-info -actimeleft | head -1') |
901 |
> |
timeLeftServer = runCommand('voms-proxy-info -actimeleft 2>/dev/null | head -1') |
902 |
|
if not timeLeftServer or not isInt(timeLeftServer): |
903 |
|
mustRenew = 1 |
904 |
|
elif timeLeftLocal<minTimeLeft or timeLeftServer<minTimeLeft: |
907 |
|
pass |
908 |
|
|
909 |
|
if mustRenew: |
910 |
< |
common.logger.message( "No valid proxy found or timeleft too short!\n Creating a user proxy with default length of 24h\n") |
911 |
< |
cmd = 'voms-proxy-init -voms cms -valid 24:00' |
910 |
> |
common.logger.message( "No valid proxy found or remaining time of validity of already existing proxy shorter than 10 hours!\n Creating a user proxy with default length of 192h\n") |
911 |
> |
cmd = 'voms-proxy-init -voms '+self.VO |
912 |
> |
if self.group: |
913 |
> |
cmd += ':/'+self.VO+'/'+self.group |
914 |
> |
if self.role: |
915 |
> |
cmd += '/role='+self.role |
916 |
> |
cmd += ' -valid 192:00' |
917 |
|
try: |
918 |
|
# SL as above: damn it! |
919 |
+ |
common.logger.debug(10,cmd) |
920 |
|
out = os.system(cmd) |
921 |
|
if (out>0): raise CrabException("Unable to create a valid proxy!\n") |
922 |
|
except: |
923 |
|
msg = "Unable to create a valid proxy!\n" |
924 |
|
raise CrabException(msg) |
805 |
– |
# cmd = 'grid-proxy-info -timeleft' |
806 |
– |
# cmd_out = runCommand(cmd,0,20) |
925 |
|
pass |
926 |
|
|
927 |
|
## now I do have a voms proxy valid, and I check the myproxy server |
936 |
|
reTime = re.compile( r'timeleft: (\d+)' ) |
937 |
|
#print "<"+str(reTime.search( cmd_out ).group(1))+">" |
938 |
|
if reTime.match( cmd_out ): |
939 |
< |
time = reTime.search( line ).group(1) |
939 |
> |
time = reTime.search( cmd_out ).group(1) |
940 |
|
if time < minTimeLeftServer: |
941 |
|
renewProxy = 1 |
942 |
|
common.logger.message('No credential delegation will expire in '+time+' hours: renew it') |
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 |
+ |
|