Loading transfer_service/group_rw_executor.py +6 −6 Original line number Original line Diff line number Diff line Loading @@ -56,16 +56,16 @@ class GroupRwExecutor(TaskExecutor): self.dbConn.setStartTime(self.jobId) self.dbConn.setStartTime(self.jobId) if self.requestType == "GRPR_ADD": if self.requestType == "GRPR_ADD": self.logger.info(f"CMD: vos_group read add {self.groupName} {self.vospacePath}") self.logger.info(f"User command: vos_group read add {self.groupName[0]} {self.vospacePath}") self.dbConn.updateGroupRead(self.groupName, [], self.vospacePath) self.dbConn.updateGroupRead(self.groupName, [], self.vospacePath) elif self.requestType == "GRPR_DEL": elif self.requestType == "GRPR_DEL": self.logger.info(f"CMD: vos_group read del {self.groupName} {self.vospacePath}") self.logger.info(f"User command: vos_group read del {self.groupName[0]} {self.vospacePath}") self.dbConn.updateGroupRead([], self.groupName, self.vospacePath) self.dbConn.updateGroupRead([], self.groupName, self.vospacePath) elif self.requestType == "GRPW_ADD": elif self.requestType == "GRPW_ADD": self.logger.info(f"CMD: vos_group write add {self.groupName} {self.vospacePath}") self.logger.info(f"User command: vos_group write add {self.groupName[0]} {self.vospacePath}") self.dbConn.updateGroupWrite(self.groupName, [], self.vospacePath) self.dbConn.updateGroupWrite(self.groupName, [], self.vospacePath) elif self.requestType == "GRPW_DEL": elif self.requestType == "GRPW_DEL": self.logger.info(f"CMD: vos_group write del {self.groupName} {self.vospacePath}") self.logger.info(f"User command: vos_group write del {self.groupName[0]} {self.vospacePath}") self.dbConn.updateGroupWrite([], self.groupName, self.vospacePath) self.dbConn.updateGroupWrite([], self.groupName, self.vospacePath) except Exception: except Exception: self.logger.exception("FATAL: something went wrong during the execution phase.") self.logger.exception("FATAL: something went wrong during the execution phase.") Loading @@ -79,7 +79,6 @@ class GroupRwExecutor(TaskExecutor): results = [{"target": ""}] results = [{"target": ""}] self.dbConn.setResults(self.jobId, results) self.dbConn.setResults(self.jobId, results) # Send e-mail notification m = Mailer(self.logger) m = Mailer(self.logger) m.addRecipient(self.adminEmail) m.addRecipient(self.adminEmail) userEmail = self.dbConn.getUserEmail(self.userId) userEmail = self.dbConn.getUserEmail(self.userId) Loading Loading @@ -116,6 +115,7 @@ Removed '{self.realGroupName}' from 'group_write' for {self.vospacePath} and any self.dbConn.insertJob(self.jobObj) self.dbConn.insertJob(self.jobObj) self.dbConn.setEndTime(self.jobId) self.dbConn.setEndTime(self.jobId) self.logger.info("Job phase updated to ERROR.") self.logger.info("Job phase updated to ERROR.") # Send e-mail notification m.setMessage("VOSpace group_rw notification", msg) m.setMessage("VOSpace group_rw notification", msg) m.send() m.send() except Exception: except Exception: Loading transfer_service/tape_client.py +5 −5 Original line number Original line Diff line number Diff line Loading @@ -51,7 +51,7 @@ class TapeClient(object): try: try: stdin, stdout, stderr = self.client.exec_command(cmd) stdin, stdout, stderr = self.client.exec_command(cmd) except Exception: except Exception: self.logger.exception("Unable to execute command: '{cmd}'") self.logger.exception(f"Unable to execute command: '{cmd}'") raise raise else: else: exitCode = stdout.channel.recv_exit_status() exitCode = stdout.channel.recv_exit_status() Loading Loading @@ -93,7 +93,7 @@ class TapeClient(object): try: try: stdin, stdout, stderr = self.client.exec_command(cmd) stdin, stdout, stderr = self.client.exec_command(cmd) except Exception: except Exception: self.logger.exception("Unable to execute command: '{cmd}'") self.logger.exception(f"Unable to execute command: '{cmd}'") raise raise else: else: exitCode = stdout.channel.recv_exit_status() exitCode = stdout.channel.recv_exit_status() Loading Loading @@ -160,7 +160,7 @@ class TapeClient(object): try: try: stdin, stdout, stderr = self.client.exec_command(cmd) stdin, stdout, stderr = self.client.exec_command(cmd) except Exception: except Exception: self.logger.exception("Unable to execute command: '{cmd}'") self.logger.exception(f"Unable to execute command: '{cmd}'") raise raise else: else: exitCode = stdout.channel.recv_exit_status() exitCode = stdout.channel.recv_exit_status() Loading Loading @@ -192,7 +192,7 @@ class TapeClient(object): try: try: stdin, stdout, stderr = self.client.exec_command(cmd) stdin, stdout, stderr = self.client.exec_command(cmd) except Exception: except Exception: self.logger.exception("Unable to execute command: '{cmd}'") self.logger.exception(f"Unable to execute command: '{cmd}'") raise raise else: else: exitCode = stdout.channel.recv_exit_status() exitCode = stdout.channel.recv_exit_status() Loading @@ -213,7 +213,7 @@ class TapeClient(object): try: try: stdin, stdout, stderr = self.client.exec_command(cmd) stdin, stdout, stderr = self.client.exec_command(cmd) except Exception: except Exception: self.logger.exception("Unable to execute command: '{cmd}'") self.logger.exception(f"Unable to execute command: '{cmd}'") raise raise else: else: exitCode = stdout.channel.recv_exit_status() exitCode = stdout.channel.recv_exit_status() Loading Loading
transfer_service/group_rw_executor.py +6 −6 Original line number Original line Diff line number Diff line Loading @@ -56,16 +56,16 @@ class GroupRwExecutor(TaskExecutor): self.dbConn.setStartTime(self.jobId) self.dbConn.setStartTime(self.jobId) if self.requestType == "GRPR_ADD": if self.requestType == "GRPR_ADD": self.logger.info(f"CMD: vos_group read add {self.groupName} {self.vospacePath}") self.logger.info(f"User command: vos_group read add {self.groupName[0]} {self.vospacePath}") self.dbConn.updateGroupRead(self.groupName, [], self.vospacePath) self.dbConn.updateGroupRead(self.groupName, [], self.vospacePath) elif self.requestType == "GRPR_DEL": elif self.requestType == "GRPR_DEL": self.logger.info(f"CMD: vos_group read del {self.groupName} {self.vospacePath}") self.logger.info(f"User command: vos_group read del {self.groupName[0]} {self.vospacePath}") self.dbConn.updateGroupRead([], self.groupName, self.vospacePath) self.dbConn.updateGroupRead([], self.groupName, self.vospacePath) elif self.requestType == "GRPW_ADD": elif self.requestType == "GRPW_ADD": self.logger.info(f"CMD: vos_group write add {self.groupName} {self.vospacePath}") self.logger.info(f"User command: vos_group write add {self.groupName[0]} {self.vospacePath}") self.dbConn.updateGroupWrite(self.groupName, [], self.vospacePath) self.dbConn.updateGroupWrite(self.groupName, [], self.vospacePath) elif self.requestType == "GRPW_DEL": elif self.requestType == "GRPW_DEL": self.logger.info(f"CMD: vos_group write del {self.groupName} {self.vospacePath}") self.logger.info(f"User command: vos_group write del {self.groupName[0]} {self.vospacePath}") self.dbConn.updateGroupWrite([], self.groupName, self.vospacePath) self.dbConn.updateGroupWrite([], self.groupName, self.vospacePath) except Exception: except Exception: self.logger.exception("FATAL: something went wrong during the execution phase.") self.logger.exception("FATAL: something went wrong during the execution phase.") Loading @@ -79,7 +79,6 @@ class GroupRwExecutor(TaskExecutor): results = [{"target": ""}] results = [{"target": ""}] self.dbConn.setResults(self.jobId, results) self.dbConn.setResults(self.jobId, results) # Send e-mail notification m = Mailer(self.logger) m = Mailer(self.logger) m.addRecipient(self.adminEmail) m.addRecipient(self.adminEmail) userEmail = self.dbConn.getUserEmail(self.userId) userEmail = self.dbConn.getUserEmail(self.userId) Loading Loading @@ -116,6 +115,7 @@ Removed '{self.realGroupName}' from 'group_write' for {self.vospacePath} and any self.dbConn.insertJob(self.jobObj) self.dbConn.insertJob(self.jobObj) self.dbConn.setEndTime(self.jobId) self.dbConn.setEndTime(self.jobId) self.logger.info("Job phase updated to ERROR.") self.logger.info("Job phase updated to ERROR.") # Send e-mail notification m.setMessage("VOSpace group_rw notification", msg) m.setMessage("VOSpace group_rw notification", msg) m.send() m.send() except Exception: except Exception: Loading
transfer_service/tape_client.py +5 −5 Original line number Original line Diff line number Diff line Loading @@ -51,7 +51,7 @@ class TapeClient(object): try: try: stdin, stdout, stderr = self.client.exec_command(cmd) stdin, stdout, stderr = self.client.exec_command(cmd) except Exception: except Exception: self.logger.exception("Unable to execute command: '{cmd}'") self.logger.exception(f"Unable to execute command: '{cmd}'") raise raise else: else: exitCode = stdout.channel.recv_exit_status() exitCode = stdout.channel.recv_exit_status() Loading Loading @@ -93,7 +93,7 @@ class TapeClient(object): try: try: stdin, stdout, stderr = self.client.exec_command(cmd) stdin, stdout, stderr = self.client.exec_command(cmd) except Exception: except Exception: self.logger.exception("Unable to execute command: '{cmd}'") self.logger.exception(f"Unable to execute command: '{cmd}'") raise raise else: else: exitCode = stdout.channel.recv_exit_status() exitCode = stdout.channel.recv_exit_status() Loading Loading @@ -160,7 +160,7 @@ class TapeClient(object): try: try: stdin, stdout, stderr = self.client.exec_command(cmd) stdin, stdout, stderr = self.client.exec_command(cmd) except Exception: except Exception: self.logger.exception("Unable to execute command: '{cmd}'") self.logger.exception(f"Unable to execute command: '{cmd}'") raise raise else: else: exitCode = stdout.channel.recv_exit_status() exitCode = stdout.channel.recv_exit_status() Loading Loading @@ -192,7 +192,7 @@ class TapeClient(object): try: try: stdin, stdout, stderr = self.client.exec_command(cmd) stdin, stdout, stderr = self.client.exec_command(cmd) except Exception: except Exception: self.logger.exception("Unable to execute command: '{cmd}'") self.logger.exception(f"Unable to execute command: '{cmd}'") raise raise else: else: exitCode = stdout.channel.recv_exit_status() exitCode = stdout.channel.recv_exit_status() Loading @@ -213,7 +213,7 @@ class TapeClient(object): try: try: stdin, stdout, stderr = self.client.exec_command(cmd) stdin, stdout, stderr = self.client.exec_command(cmd) except Exception: except Exception: self.logger.exception("Unable to execute command: '{cmd}'") self.logger.exception(f"Unable to execute command: '{cmd}'") raise raise else: else: exitCode = stdout.channel.recv_exit_status() exitCode = stdout.channel.recv_exit_status() Loading