Skip to content

Commit f0e11d1

Browse files
committed
fix: Singularity issue with non existing SE + JobAgent issue with submission exceptions
1 parent e2e31a6 commit f0e11d1

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/DIRAC/Resources/Computing/SingularityComputingElement.py

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

src/DIRAC/WorkloadManagementSystem/Agent/JobAgent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ def _submitJob(
665665
self.log.exception("Exception occurred when submitting", f"JobID: {jobID}")
666666
taskID = 0
667667
# We create a S_ERROR from the exception to compute it as a normal error
668-
self.computingElement.taskResults[taskID] = S_ERROR(unexpectedSubmitException)
668+
self.computingElement.taskResults[taskID] = S_ERROR(str(unexpectedSubmitException))
669669
self.jobs[jobID]["TaskID"] = taskID
670670
return S_OK()
671671

0 commit comments

Comments
 (0)