Skip to content

Commit 46c36bd

Browse files
committed
fix: remove deprecated SudoComputingElement
1 parent 2f92c60 commit 46c36bd

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

src/DIRAC/Resources/Computing/PoolComputingElement.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
LocalCEType = Pool
1111
1212
The Pool Computing Element is specific: it embeds an additional "inner" CE
13-
(`InProcess` by default, `Sudo`, `Singularity`). The "inner" CE can be specified such as::
13+
(`InProcess` by default, or `Singularity`). The "inner" CE can be specified such as::
1414
1515
LocalCEType = Pool/Singularity
1616
@@ -19,24 +19,18 @@
1919
2020
**Code Documentation**
2121
"""
22-
import functools
23-
import os
2422
import concurrent.futures
23+
import functools
2524

26-
from DIRAC import S_OK, S_ERROR
25+
from DIRAC import S_ERROR, S_OK
2726
from DIRAC.ConfigurationSystem.private.ConfigurationData import ConfigurationData
28-
2927
from DIRAC.Resources.Computing.ComputingElement import ComputingElement
30-
3128
from DIRAC.Resources.Computing.InProcessComputingElement import InProcessComputingElement
3229
from DIRAC.Resources.Computing.SingularityComputingElement import SingularityComputingElement
3330

34-
# Number of unix users to run job payloads with sudo
35-
MAX_NUMBER_OF_SUDO_UNIX_USERS = 32
36-
3731

3832
def executeJob(executableFile, proxy, taskID, inputs, **kwargs):
39-
"""wrapper around ce.submitJob: decides which CE to use (Sudo or InProcess or Singularity)
33+
"""wrapper around ce.submitJob: decides which CE to use (InProcess or Singularity)
4034
4135
:param str executableFile: location of the executable file
4236
:param str proxy: proxy file location to be used for job submission
@@ -134,13 +128,6 @@ def submitJob(self, executableFile, proxy=None, inputs=None, **kwargs):
134128
# Here we define task kwargs: adding complex objects like thread.Lock can trigger errors in the task
135129
taskKwargs = {"InnerCESubmissionType": self.innerCESubmissionType}
136130
taskKwargs["jobDesc"] = kwargs.get("jobDesc", {})
137-
if self.innerCESubmissionType == "Sudo":
138-
for nUser in range(MAX_NUMBER_OF_SUDO_UNIX_USERS):
139-
if nUser not in self.userNumberPerTask.values():
140-
break
141-
taskKwargs["NUser"] = nUser
142-
if "USER" in os.environ:
143-
taskKwargs["PayloadUser"] = os.environ["USER"] + f"p{str(nUser).zfill(2)}"
144131

145132
# Submission
146133
future = self.pPool.submit(executeJob, executableFile, proxy, self.taskID, inputs, **taskKwargs)

0 commit comments

Comments
 (0)