PilotWrapper

Module holding function(s) creating the pilot wrapper.

This is a DIRAC-free module, so it could possibly be used also outside of DIRAC installations.

The main client of this module is the SiteDirector, that invokes the functions here more or less like this:

pilotFilesCompressedEncodedDict = getPilotFilesCompressedEncodedDict(pilotFiles)
localPilot = pilotWrapperScript(pilotFilesCompressedEncodedDict,
                                pilotOptions,
                                pilotExecDir)
_writePilotWrapperFile(localPilot=localPilot)
DIRAC.WorkloadManagementSystem.Utilities.PilotWrapper.getPilotFilesCompressedEncodedDict(pilotFiles, proxy=None)
this function will return the dictionary of pilot files names : encodedCompressedContent
that we are going to send
Parameters:
  • pilotFiles (list) – list of pilot files (list of location on the disk)
  • proxy (X509Chain) – the proxy to send
DIRAC.WorkloadManagementSystem.Utilities.PilotWrapper.pilotWrapperScript(pilotFilesCompressedEncodedDict=None, pilotOptions='', pilotExecDir='', envVariables=None, location='')

Returns the content of the pilot wrapper script.

The pilot wrapper script is a bash script that invokes the system python. Linux only.
Parameters:
  • pilotFilesCompressedEncodedDict (dict) – this is a possible dict of name:compressed+encoded content files. the proxy can be part of this, and of course the pilot files
  • pilotOptions (basestring) – options with which to start the pilot
  • pilotExecDir (basestring) – pilot execution directory
  • envVariables (dict) – dictionary of environment variables
  • location (basestring) – location where to get the pilot files
Returns:

content of the pilot wrapper

Return type:

basestring