Skip to content

Commit 385126f

Browse files
authored
Merge pull request #8124 from DIRACGridBot/cherry-pick-2-3255c8ec6-integration
[sweep:integration] fix: Singularity issue with non existing SE + JobAgent issue with exception raised during submission
2 parents 5aa70cf + 54cf9ca commit 385126f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/DIRAC/Resources/Computing/SingularityComputingElement.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,12 @@ def submitJob(self, executableFile, proxy=None, **kwargs):
381381
for seName in localSEs:
382382
try:
383383
# Find the base path if a File protocol is defined
384-
mountedPath = StorageElement(seName).getStorageParameters(protocol="file")["Value"]["Path"]
384+
se = StorageElement(seName)
385+
if not se.valid:
386+
self.log.warn(f"Storage Element {seName} not valid")
387+
continue
388+
389+
mountedPath = se.getStorageParameters(protocol="file")["Value"]["Path"]
385390
bindPaths.append(f"{mountedPath}:{mountedPath}:ro")
386391
except KeyError:
387392
pass

src/DIRAC/WorkloadManagementSystem/Agent/JobAgent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ def _submitJob(
651651
self.log.exception("Exception occurred when submitting", f"JobID: {jobID}")
652652
taskID = 0
653653
# We create a S_ERROR from the exception to compute it as a normal error
654-
self.computingElement.taskResults[taskID] = S_ERROR(unexpectedSubmitException)
654+
self.computingElement.taskResults[taskID] = S_ERROR(str(unexpectedSubmitException))
655655
self.jobs[jobID]["TaskID"] = taskID
656656
return S_OK()
657657

0 commit comments

Comments
 (0)