From 201cde4ef2281e0c2cc4c72c2b082cd4f4e0f0a8 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Thu, 12 Sep 2024 18:34:58 +0200 Subject: [PATCH] feat: SD will always bundle proxy --- .../Systems/WorkloadManagement/tagsAndJobs.rst | 1 - .../AdministratorGuide/Tutorials/installWMS.rst | 1 - .../WorkloadManagementSystem/Agent/SiteDirector.py | 11 +++-------- .../Utilities/QueueUtilities.py | 4 ---- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/docs/source/AdministratorGuide/Systems/WorkloadManagement/tagsAndJobs.rst b/docs/source/AdministratorGuide/Systems/WorkloadManagement/tagsAndJobs.rst index 6c1e087cca4..1e85686cb96 100644 --- a/docs/source/AdministratorGuide/Systems/WorkloadManagement/tagsAndJobs.rst +++ b/docs/source/AdministratorGuide/Systems/WorkloadManagement/tagsAndJobs.rst @@ -35,7 +35,6 @@ Let's take an example:: maxCPUTime = 200 MaxTotalJobs = 5 MaxWaitingJobs = 10 - BundleProxy = True RemoveOutput = True } # This queue has Tag = GPU. So it will accept: diff --git a/docs/source/AdministratorGuide/Tutorials/installWMS.rst b/docs/source/AdministratorGuide/Tutorials/installWMS.rst index 6a1e6e510c3..d4fb341d9ae 100644 --- a/docs/source/AdministratorGuide/Tutorials/installWMS.rst +++ b/docs/source/AdministratorGuide/Tutorials/installWMS.rst @@ -227,7 +227,6 @@ Then, as ``diracuser`` with the ``dirac_admin`` proxy, we need to define a CE in CPUTime = 40000 MaxTotalJobs = 5 MaxWaitingJobs = 10 - BundleProxy = True BatchError = /home/diracpilot/localsite/error ExecutableArea = /home/diracpilot/localsite/submission RemoveOutput = True diff --git a/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py b/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py index 60781584a60..450d75545c9 100644 --- a/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py +++ b/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py @@ -730,16 +730,11 @@ def _submitPilotsToQueue(self, pilotsToSubmit, ce, queue): :rtype: dict """ self.log.info("Going to submit pilots", f"(a maximum of {pilotsToSubmit} pilots to {queue} queue)") - - bundleProxy = self.queueDict[queue].get("BundleProxy", False) - proxy = None - if bundleProxy: - proxy = ce.proxy - + jobExecDir = self.queueDict[queue]["ParametersDict"].get("JobExecDir", "") envVariables = self.queueDict[queue]["ParametersDict"].get("EnvironmentVariables", None) - executable = self.getExecutable(queue, proxy=proxy, jobExecDir=jobExecDir, envVariables=envVariables) + executable = self.getExecutable(queue, proxy=ce.proxy, jobExecDir=jobExecDir, envVariables=envVariables) submitResult = ce.submitJob(executable, "", pilotsToSubmit) # In case the CE does not need the executable after the submission, we delete it @@ -956,7 +951,7 @@ def getExecutable(self, queue, proxy=None, jobExecDir="", envVariables=None, **k """Prepare the full executable for queue :param str queue: queue name - :param bool proxy: flag that say if to bundle or not the proxy + :param str proxy: proxy to bundle :param str jobExecDir: pilot execution dir (normally an empty string) :returns: a string the options for the pilot diff --git a/src/DIRAC/WorkloadManagementSystem/Utilities/QueueUtilities.py b/src/DIRAC/WorkloadManagementSystem/Utilities/QueueUtilities.py index 70ef5bcf4ab..f3718b4734f 100644 --- a/src/DIRAC/WorkloadManagementSystem/Utilities/QueueUtilities.py +++ b/src/DIRAC/WorkloadManagementSystem/Utilities/QueueUtilities.py @@ -87,10 +87,6 @@ def getQueuesResolved( if checkPlatform: setPlatform(ceDict, queueDict[queueName]["ParametersDict"]) - bundleProxy = queueDict[queueName]["ParametersDict"].get("BundleProxy", ceDict.get("BundleProxy")) - if bundleProxy and bundleProxy.lower() in ["true", "yes", "1"]: - queueDict[queueName]["BundleProxy"] = True - return S_OK(queueDict)