DIRACGrid / DIRAC

DIRAC Grid
http://diracgrid.org
GNU General Public License v3.0
113 stars 176 forks source link

[v8.0.48] CVMFS_Locations being an empty list not being handled correctly #7667

Closed marianne013 closed 5 months ago

marianne013 commented 5 months ago
2024-06-11 08:48:18 UTC WorkloadManagement/SiteDirectorLz/WorkloadManagement/SiteDirectorLz VERBOSE: pilotOptions: -S GridPP -e GridPP -N [cloudce-lz.grid.hep.ph.ic.ac.uk](http://cloudce-lz.grid.hep.ph.ic.ac.uk/) -Q lzqueue -n [LCG.UKI-LT2-IC-HEP-lz.uk](http://lcg.uki-lt2-ic-hep-lz.uk/) --wnVO=lz
2024-06-11 08:48:18 UTC WorkloadManagement/SiteDirectorLz/WorkloadManagement/SiteDirectorLz ERROR: Agent exception while calling method <bound method SiteDirector.execute of <DIRAC.WorkloadManagementSystem.Agent.SiteDirector
.SiteDirector object at 0x7f8fee36da50>>
Traceback (most recent call last):
 File "/opt/dirac/DIRAC/src/DIRAC/Core/Base/AgentModule.py", line 310, in am_secureCall
   result = functor(*args)
            ^^^^^^^^^^^^^^
 File "/opt/dirac/DIRAC/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py", line 331, in execute
   result = self.submitPilots()
            ^^^^^^^^^^^^^^^^^^^
 File "/opt/dirac/DIRAC/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py", line 457, in submitPilots
   res = self._submitPilotsToQueue(pilotsToSubmit, ce, queueName)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/opt/dirac/DIRAC/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py", line 746, in _submitPilotsToQueue
   executable = self.getExecutable(queue, proxy=proxy, jobExecDir=jobExecDir, envVariables=envVariables)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/opt/dirac/DIRAC/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py", line 986, in getExecutable
   executable = self._writePilotScript(
                ^^^^^^^^^^^^^^^^^^^^^^^
 File "/opt/dirac/DIRAC/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py", line 1111, in _writePilotScript
   localPilot = pilotWrapperScript(
                ^^^^^^^^^^^^^^^^^^^
 File "/opt/dirac/DIRAC/src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py", line 126, in pilotWrapperScript
   project = pilotOptions.split(" ")[pilotOptions.split(" ").index("-l") + 1].lower() + "dirac"
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: '-l' is not in list

Simon had a glance at the code and reckons there error is somewhere here (we haven't had time to test this):

At a quick glance it boils down the CVMFS_Locations being an empty list [] by default but then they check is like this in PilotWrapper:

if CVMFS_locations is None:

That should be "if not CVMFS_locations:" so that the empty list doesn't trigger it I think.