Loading transfer_service/retrieve_executor.py +13 −11 Original line number Diff line number Diff line Loading @@ -46,7 +46,9 @@ class RetrieveExecutor(TaskExecutor): fileList.append(srcPath) self.dbConn.disconnect() if fileList: self.tapeClient.connect() self.tapeClient.recall(fileList) self.tapeClient.disconnect() def retrieveData(self): self.dbConn.connect() Loading @@ -62,11 +64,11 @@ class RetrieveExecutor(TaskExecutor): out.write(f"osRelParentPath: {osRelParentPath}\n") destPath = self.storageRetrievePath.replace("{username}", username) + osRelParentPath out.write(f"destPath: {destPath}\n\n") if storageType == "cold": #if storageType == "cold": #srcPathPrefix = self.tapeStorageBasePath.replace("{username}", self.username) # TO BE DONE pass else: # pass #else: os.makedirs(destPath, exist_ok = True) sp = subprocess.run(["rsync", "-av", srcPath, destPath], capture_output = True) out.write(f"rsync stdout: {sp.stdout}") Loading transfer_service/tape_client.py +9 −4 Original line number Diff line number Diff line Loading @@ -73,8 +73,13 @@ class TapeClient(object): def recall(self, fileList): #TODO cmd = "eeadm recall" tmp = str(uuid.uuid1().hex) + ".tmp" tmp = str(uuid.uuid1().hex) + "-vos_recall.tmp" fp = open(tmp, "a") for f in fileList: fp.write(f"{f}\n") fp.close() self.copy("./" + tmp, "/tmp/" + tmp) cmd = "eeadm recall /tmp/" + tmp stdin, stdout, stderr = self.client.exec_command(cmd) def recallChecksumFiles(self, dirName): Loading Loading
transfer_service/retrieve_executor.py +13 −11 Original line number Diff line number Diff line Loading @@ -46,7 +46,9 @@ class RetrieveExecutor(TaskExecutor): fileList.append(srcPath) self.dbConn.disconnect() if fileList: self.tapeClient.connect() self.tapeClient.recall(fileList) self.tapeClient.disconnect() def retrieveData(self): self.dbConn.connect() Loading @@ -62,11 +64,11 @@ class RetrieveExecutor(TaskExecutor): out.write(f"osRelParentPath: {osRelParentPath}\n") destPath = self.storageRetrievePath.replace("{username}", username) + osRelParentPath out.write(f"destPath: {destPath}\n\n") if storageType == "cold": #if storageType == "cold": #srcPathPrefix = self.tapeStorageBasePath.replace("{username}", self.username) # TO BE DONE pass else: # pass #else: os.makedirs(destPath, exist_ok = True) sp = subprocess.run(["rsync", "-av", srcPath, destPath], capture_output = True) out.write(f"rsync stdout: {sp.stdout}") Loading
transfer_service/tape_client.py +9 −4 Original line number Diff line number Diff line Loading @@ -73,8 +73,13 @@ class TapeClient(object): def recall(self, fileList): #TODO cmd = "eeadm recall" tmp = str(uuid.uuid1().hex) + ".tmp" tmp = str(uuid.uuid1().hex) + "-vos_recall.tmp" fp = open(tmp, "a") for f in fileList: fp.write(f"{f}\n") fp.close() self.copy("./" + tmp, "/tmp/" + tmp) cmd = "eeadm recall /tmp/" + tmp stdin, stdout, stderr = self.client.exec_command(cmd) def recallChecksumFiles(self, dirName): Loading