HTCondor Project List Archives



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-devel] LocalCredd match is case sensitive



On Monday 05 July 2010 18:22:04 Burnett, Ben wrote:
> That the operator =?= does case sensitive comparisons is by design (and is
> documented as such).  If you need to to case insensitive comparisons, use
> 'stricmp' in your expression.  For instance you could try the following:
> 
> Requirements = ... && (isString(LocalCredd) && (stricmp(LocalCredd,
> "XS205803.MELINDA.local") == 0))

Hello Ben, thanks for the quick answer. 

I agree. My main issue is that I did not write the requirements: Condor did 
this for me, and in my opinion used the wrong operator (the case sensitive 
one, for comparing DNS names which should be case insensitive). Sorry if I was 
not clear in my original post. 

The Job submission template I use is the following: 

Universe = vanilla
Executable = c:\python26\python.exe
Arguments = somescript.py
Transfer_executable = False
Run_as_owner = True
InitialDir = c:\data
Log = c:\data\logfile.txt
Error = c:\data\errors.txt
Queue

I don't provide a "Requirements" line. My understanding is that specifying 
"Run_as_owner = True" in the job will cause the (HasWindowsRunAsOwner && 
(LocalCredd =?= "XS205803.MELINDA.local")) requirement to be automatically 
added to the job's requirements. That's fine, but the comparison used has to 
be case insensitive to avoid the problem I experienced yesterday. 


-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science