DIRACGrid/DIRAC — Issue #325: Bug in PilotDirector, dirac-pilot
Author: graciani
Created: 2011-11-27 19:13:20+00:00
State: open

Using -V for the installation, causes DIRAC/VirtualOrganization to get this value, which is wrong. In particular LHCb pilots are being submitted with -V "LHCb", and this causes the VO to be "LHCb" instead of "lhcb".

Now Installation and Virtual Organization are distinct entities. The code

```python
if self.installInstallation:
pilotOptions.append( '-V %s' % self.installInstallation )
elif self.virtualOrganization:
pilotOptions.append( '-V %s' % self.virtualOrganization )
```

should become

```python
if self.installInstallation:
pilotOptions.append( '-I %s' % self.installInstallation )
if self.virtualOrganization:
pilotOptions.append( '-V %s' % self.virtualOrganization )
```

dirac-pilot also needs to be updated in the following lines:

```python
elif o in ( '-V', '--VO' ):
configureOpts.append( '-V "%s"' % v )
#HACK while VO == project in dirac-install
installOpts.append( '-V "%s"' % v )
```

they should become:

```python
elif o in ( '-V', '--VO' ):
configureOpts.append( '-V "%s"' % v )
elif o in ( '-I', '--Installation' ):
installOpts.append( '-I "%s"' % v )
```

and the new option added to the parsing.

Do we also need to add?

```python
elif o in ( '-I', '--Installation' ):
installOpts.append( '-I "%s"' % v )
configureOpts.append( 'defaults-%s.cfg' % v )
```