ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/SchedulerGlite.py
(Generate patch)

Comparing COMP/CRAB/python/SchedulerGlite.py (file contents):
Revision 1.75 by spiga, Sun Jan 17 19:01:08 2010 UTC vs.
Revision 1.85 by belforte, Thu Jun 14 15:50:46 2012 UTC

# Line 18 | Line 18 | class SchedulerGlite(SchedulerGrid):
18      def __init__(self, name="GLITE"):
19          SchedulerGrid.__init__(self,name)
20  
21 <        self.OSBsize = 55000000
21 >        self.EDG_retry_count        = 0
22 >        self.EDG_shallow_retry_count= -1
23 >        self.OSBsize = 55*1000*1000  # 55MB
24  
25      def configure(self,cfg_params):
26          SchedulerGrid.configure(self, cfg_params)
# Line 45 | Line 47 | class SchedulerGlite(SchedulerGrid):
47      def rb_configure(self, RB):
48          url ='http://cmsdoc.cern.ch/cms/LCG/crab/config/'
49          from Downloader import Downloader
50 +        import httplib
51          common.logger.debug('Downloading config files for WMS: '+url)
52          ## 25-Jun-2009 SL: patch to use Cream enabled WMS
53          if ( self.cfg_params.get('GRID.use_cream',None) ):
54              RB='CREAM'
55          if not RB: return None
53        glite_config = None
56          rb_param_file = None
57          configFileName = 'glite_wms_'+str(RB)+'.conf'
58  
59 <        results = Downloader(url, os.getcwd())
60 <        gliteConfig  = results.filePath(configFileName)
59 >        results = Downloader(url)
60 >        try:
61 >            gliteConfig  = results.filePath(configFileName)
62 >        except httplib.HTTPException, ex:
63 >            raise CrabException( "Problem getting RB config file: %s, reason:"%(configFileName, ex) )
64  
65 <        if (glite_config ):
66 <            rb_param_file = glite_config
65 >        if (gliteConfig ):
66 >            rb_param_file = gliteConfig
67          return rb_param_file
68  
69      def ce_list(self):
# Line 158 | Line 163 | class SchedulerGlite(SchedulerGrid):
163          dest=  task.jobs[i-1]['dlsDestination']
164  
165          req=''
166 <        req +=task['jobType']
166 >        #req +=task['jobType']
167 >        ####### FEDE FOR BUG 73010 ############
168 >        try:
169 >            #print "task['jobType'] = ", task['jobType']
170 >            req +=task['jobType']
171 >        except TypeError:
172 >            msg = "Error: wrong or missing task info. Your created task can not be submitted. Please check your configuration file and create the task again.  \n "
173 >            raise CrabException(msg)
174 >        #######################################
175  
176          sched_param=''
177          sched_param+='Requirements = ' + req +self.specific_req() + self.se_list(dest) +\
# Line 167 | Line 180 | class SchedulerGlite(SchedulerGrid):
180          sched_param+='MyProxyServer = "' + self.proxyServer + '";\n'
181          sched_param+='VirtualOrganisation = "' + self.VO + '";\n'
182          sched_param+='RetryCount = '+str(self.EDG_retry_count)+';\n'
183 +        sched_param+='DefaultNodeRetryCount = '+str(self.EDG_retry_count)+';\n'
184          sched_param+='ShallowRetryCount = '+str(self.EDG_shallow_retry_count)+';\n'
185 +        sched_param+='DefaultNodeShallowRetryCount = '+str(self.EDG_shallow_retry_count)+';\n'
186  
187          return sched_param
188  
# Line 236 | Line 251 | class SchedulerGlite(SchedulerGrid):
251  
252          txt += '}\n'
253          return txt
254 +
255 +    def listMatch(self, dest, full):
256 +        matching='fast'
257 +        
258 +        if self.boss().schedulerConfig['name'] == 'SchedulerGLite' :
259 +            taskId=common._db.getTask()
260 +            req=str(self.sched_parameter(1,taskId))
261 +            sites = self.boss().schedSession().matchResources(taskId, requirements=req)
262 +        else :
263 +            sites = SchedulerGrid.listMatch(self, dest, full)
264 +            
265 +        if full == True: matching='full'
266 +        common.logger.debug("list of available site ( "+str(matching) +" matching ) : "+str(sites))
267 +        
268 +        return sites

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines