Commit 00c076fb authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Merge branch 'testing'

parents 05dff290 fef6a65a
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class ImportExecutor(TaskExecutor):

            if self.storageType == "cold":
                self.tapeClient.connect()
                self.tapeClient.recallChecksumFiles(self.path)
                self.tapeClient.recallChecksumFiles(self.path, self.jobId)
                self.tapeClient.disconnect()

            self.logger.info(f"Checking for invalid file/dir names in '{self.path}'")
+3 −2
Original line number Diff line number Diff line
@@ -176,13 +176,14 @@ class TapeClient(object):
                    raise TapeClientException(cmd, exitCode, stderr)
                return exitCode

    def recallChecksumFiles(self, dirName):
    def recallChecksumFiles(self, dirName, jobId):
        """
        Recursively recalls from tape all the checksum files related to
        the 'dirName' directory.
        A VOSpace job ID is also required as parameter.
        """
        self.logger.info("Starting RECALL_CHECKSUM operation...")
        checksumFileList = "vos_recall_checksum_files-{jobId}.lst"
        checksumFileList = f"vos_recall_checksum_files-{jobId}.lst"
        cmd = f"find $(dirname {dirName}) -type f \( -iname \"*-md5sum.txt\" \) > {self.VOSPACE_WD}/{checksumFileList} && {self.DSMRECALL} -filelist={self.VOSPACE_WD}/{checksumFileList} > /dev/null 2>&1"
        try:
            stdin, stdout, stderr = self.client.exec_command(cmd)