DIRACGrid/DIRAC — Issue #451: dirac-proxy-init fails to obtain a VOMS extension for a different vo than the default
Author: sposs
Created: 2012-01-26 18:26:04+00:00
State: open

We have 2 VOs that can use our setup: calice and ILC. I tried to obtain a calice proxy but failed:
Failed adding VOMS attribute: Failed to set VOMS attributes. Command: voms-proxy-init -cert "/tmp/x509up_u500" -key "/tmp/x509up_u500" -out "/tmp/tmpkPN8Hx" -voms "ilc:/calice" -valid "23:54" -vomses "/afs/cern.ch/eng/clic/software/DIRAC/etc/grid-security/vomses"; StdOut: Your identity: /DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=sposs/CN=641989/CN=Stephane Guillaume Poss/CN=proxy

This is because of -voms "ilc:/calice" . This comes from the Registry.getVOForGroup that first gets the default VO and returns it.
def getVOForGroup( group ):
voName = getVO()
if voName:
return voName
return gConfig.getValue( "%s/Groups/%s/VO" % ( gBaseSecuritySection, group ), "" )

I suggest to drop the first part, and also use VOMSVO instead of VO as an option name (more consistent with what lies 24 lines below).