DIRACGrid/DIRAC — Issue #531: Possible BUG in FileCatalogFactory - DIRAC v6r2-pre9
Author: fstagni
Created: 2012-02-21 13:56:42+00:00
State: open

The new FileCatalogFactory module introduced with DIRAC v6r2-pre9 is apparently buggy. Not clear to me what is the reason, but this is what I get from a job:

2012-02-21 13:09:14 UTC dirac-jobexec/FileCatalogFactory VERB: Creating LcgFileCatalogCombined client
2012-02-21 13:09:14 UTC dirac-jobexec VERB: Trying to load from root path LHCbDIRAC
2012-02-21 13:09:14 UTC dirac-jobexec VERB: Trying to load from root path DIRAC
2012-02-21 13:09:14 UTC dirac-jobexec EXCEPT: Failed to instantiate LcgFileCatalogCombinedClient()
2012-02-21 13:09:14 UTC dirac-jobexec EXCEPT: == EXCEPTION ==
2012-02-21 13:09:14 UTC dirac-jobexec EXCEPT: Unknown exception type:putenv() argument 2 must be string, not int
2012-02-21 13:09:14 UTC dirac-jobexec EXCEPT: ===============

I think this is printed by:

```python
try:
if catalogType in ['LcgFileCatalogCombined','LcgFileCatalog']:
# The LFC special case
infoSys = gConfig.getValue(catalogPath+'/LcgGfalInfosys','')
host = gConfig.getValue(catalogPath+'/MasterHost','')
evalString = "catalogModule.%s('%s','%s')" % (moduleName,infoSys,host)
else:
if catalogURL:
evalString = "catalogModule.%s(url='%s')" % (moduleName,catalogURL)
else:
evalString = "catalogModule.%s()" % moduleName
catalog = eval( evalString )
if not catalog.isOK():
errStr = "Failed to instantiate catalog plug in"
gLogger.error( errStr, moduleName )
return S_ERROR( errStr )
self.log.info('Loaded module %sClient from %s' % ( catalogType, moduleRootPath ) )
return S_OK( catalog )
except Exception, x:
errStr = "Failed to instantiate %s()" % ( moduleName )
gLogger.exception( errStr, lException = x )
return S_ERROR( errStr )
```

Also (minor): why using a gLogger.x() when a self.log is defined?