Beispiel #1
0
            failJob(job.result[1], error.ERR_MISSINGGUID, job, pilotserver, pilotport, pilotErrorDiag=pilotErrorDiag)

    tolog("..............................................................................................................")
    tolog("Created %s with:" % (_fname))
    tolog(".. log            : %s (to be transferred)" % (job.logFile))
    tolog(".. log guid       : %s" % (guid))
    tolog(".. out files      : %s" % str(job.outFiles))
    tolog(".. out file guids : %s" % str(job.outFilesGuids))
    tolog(".. fsize          : %s" % str(fsize))
    tolog(".. checksum       : %s" % str(checksum))
    tolog("..............................................................................................................")

    # convert the preliminary metadata-<jobId>.xml file to OutputFiles-<jobId>.xml for NG and for CERNVM
    # note: for CERNVM this is only really needed when CoPilot is used
    if region == 'Nordugrid' or sitename == 'CERNVM':
        if RunJobUtilities.convertMetadata4NG(os.path.join(job.workdir, job.outputFilesXML), _fname, outsDict, dsname, datasetDict):
            tolog("Metadata has been converted to NG/CERNVM format")
        else:
            job.pilotErrorDiag = "Could not convert metadata to NG/CERNVM format"
            tolog("!!WARNING!!1999!! %s" % (job.pilotErrorDiag))

    # try to build a file size and checksum dictionary for the output files
    # outputFileInfo: {'a.dat': (fsize, checksum), ...}
    # e.g.: file size for file a.dat: outputFileInfo['a.dat'][0]
    # checksum for file a.dat: outputFileInfo['a.dat'][1]
    try:
        # remove the log entries
        _fsize = fsize[1:]
        _checksum = checksum[1:]
        outputFileInfo = dict(zip(job.outFiles, zip(_fsize, _checksum)))
    except Exception, e: