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.82 by farinafa, Wed Jun 9 10:28:56 2010 UTC

# Line 18 | Line 18 | class SchedulerGlite(SchedulerGrid):
18      def __init__(self, name="GLITE"):
19          SchedulerGrid.__init__(self,name)
20  
21 +        self.EDG_retry_count        = 0
22 +        self.EDG_shallow_retry_count= -1
23          self.OSBsize = 55000000
24  
25      def 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 167 | Line 172 | class SchedulerGlite(SchedulerGrid):
172          sched_param+='MyProxyServer = "' + self.proxyServer + '";\n'
173          sched_param+='VirtualOrganisation = "' + self.VO + '";\n'
174          sched_param+='RetryCount = '+str(self.EDG_retry_count)+';\n'
175 +        sched_param+='DefaultNodeRetryCount = '+str(self.EDG_retry_count)+';\n'
176          sched_param+='ShallowRetryCount = '+str(self.EDG_shallow_retry_count)+';\n'
177 +        sched_param+='DefaultNodeShallowRetryCount = '+str(self.EDG_shallow_retry_count)+';\n'
178  
179          return sched_param
180  
# Line 236 | Line 243 | class SchedulerGlite(SchedulerGrid):
243  
244          txt += '}\n'
245          return txt
246 +
247 +    def listMatch(self, dest, full):
248 +        matching='fast'
249 +        
250 +        if self.boss().schedulerConfig['name'] == 'SchedulerGLite' :
251 +            taskId=common._db.getTask()
252 +            req=str(self.sched_parameter(1,taskId))
253 +            sites = self.boss().schedSession().matchResources(taskId, requirements=req)
254 +        else :
255 +            sites = SchedulerGrid.listMatch(self, dest, full)
256 +            
257 +        if full == True: matching='full'
258 +        common.logger.debug("list of available site ( "+str(matching) +" matching ) : "+str(sites))
259 +        
260 +        return sites

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines