1 |
< |
from SchedulerCondorCommon import SchedulerCondorCommon |
2 |
< |
import common |
1 |
> |
""" |
2 |
> |
Glidein specific portions of the interface to the BossLite scheduler |
3 |
> |
""" |
4 |
|
|
5 |
|
__revision__ = "$Id$" |
6 |
|
__version__ = "$Revision$" |
7 |
|
|
8 |
< |
# All of the content moved to SchedulerCondorCommon. |
8 |
> |
from SchedulerCondorCommon import SchedulerCondorCommon |
9 |
> |
import common |
10 |
|
|
11 |
|
class SchedulerGlidein(SchedulerCondorCommon): |
10 |
– |
def __init__(self): |
11 |
– |
SchedulerCondorCommon.__init__(self,"GLIDEIN") |
12 |
– |
return |
13 |
– |
|
14 |
– |
def sched_parameter(self,i,task): |
12 |
|
""" |
13 |
< |
Return scheduler-specific parameters |
13 |
> |
Glidein specific portions of the interface to the BossLite scheduler |
14 |
|
""" |
18 |
– |
jobParams = SchedulerCondorCommon.sched_parameter(self,i,task) |
19 |
– |
|
20 |
– |
seDest = self.blackWhiteListParser.cleanForBlackWhiteList(eval(task.jobs[i-1]['dlsDestination'])) |
21 |
– |
#ceDest = self.getCEfromSE(seDest) |
22 |
– |
|
23 |
– |
# FIXME: Translate seDest into glidein name using SiteDB |
24 |
– |
|
25 |
– |
jobParams += '+DESIRED_Sites = "T2_US_UCSD"; ' |
26 |
– |
jobParams += '+DESIRED_Archs = "INTEL,X86_64"; ' |
27 |
– |
jobParams += "Requirements = stringListMember(GLIDEIN_Site,DESIRED_Sites) && stringListMember(Arch,DESIRED_Archs); " |
15 |
|
|
16 |
< |
common._db.updateTask_({'jobType':jobParams}) |
17 |
< |
return jobParams # Not sure I even need to return anything |
16 |
> |
def __init__(self): |
17 |
> |
SchedulerCondorCommon.__init__(self,"GLIDEIN") |
18 |
> |
self.environment_unique_identifier = '$Glidein_MonitorID' |
19 |
> |
return |
20 |
> |
|
21 |
> |
|
22 |
> |
def sched_parameter(self, i, task): |
23 |
> |
""" |
24 |
> |
Return scheduler-specific parameters |
25 |
> |
""" |
26 |
> |
jobParams = SchedulerCondorCommon.sched_parameter(self, i, task) |
27 |
> |
seDest = task.jobs[i-1]['dlsDestination'] |
28 |
> |
ceDest = self.seListToCElist(seDest, onlyOSG=False) |
29 |
> |
ceString = ','.join(ceDest) |
30 |
> |
|
31 |
> |
jobParams += '+DESIRED_Gatekeepers = "'+ceString+'"; ' |
32 |
> |
jobParams += '+DESIRED_Archs = "INTEL,X86_64"; ' |
33 |
> |
jobParams += "Requirements = stringListMember(GLIDEIN_Gatekeeper,DESIRED_Gatekeepers) && stringListMember(Arch,DESIRED_Archs); " |
34 |
> |
if (self.EDG_clock_time): |
35 |
> |
jobParams += '+MaxWallTimeMins = '+self.EDG_clock_time+'; ' |
36 |
> |
else: |
37 |
> |
jobParams += '+MaxWallTimeMins = 1440; ' |
38 |
> |
|
39 |
> |
common._db.updateTask_({'jobType':jobParams}) |
40 |
> |
return jobParams # Not sure I even need to return anything |
41 |
> |
|
42 |
> |
|
43 |
> |
def listMatch(self, seList, full, onlyOSG=False): |
44 |
> |
""" |
45 |
> |
Check the compatibility of available resources |
46 |
> |
""" |
47 |
> |
ceDest = SchedulerCondorCommon.listMatch(self, seList, full, onlyOSG=False) |
48 |
> |
return ceDest |
49 |
> |
|
50 |
> |
|
51 |
> |
def envUniqueID(self): |
52 |
> |
msg = 'JobID for ML monitoring is created for Glidein scheduler: %s'%id |
53 |
> |
common.logger.debug(msg) |
54 |
> |
return '$Glidein_MonitorID' |