From 5c3f3649f16561760989d81c5feffee3c44783ba Mon Sep 17 00:00:00 2001 From: aldbr Date: Thu, 29 Feb 2024 12:02:40 +0100 Subject: [PATCH] fix: check the VO from the task queues before submitting pilots --- src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py b/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py index dfa3273bd1d..bb54f35b4d4 100644 --- a/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py +++ b/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py @@ -423,10 +423,12 @@ def _getNumberOfJobsNeedingPilots(self, waitingPilots: int, queue: str): return 0 taskQueueDict = result["Value"] - # Get the number of jobs that would match the capability of the CE + # Get the number of jobs that would match the capability of the CE and the VO waitingSupportedJobs = 0 for tq in taskQueueDict.values(): - waitingSupportedJobs += tq["Jobs"] + ownerGroup = tq.get("OwnerGroup", "") + if Registry.getVOForGroup(ownerGroup) == self.vo: + waitingSupportedJobs += tq["Jobs"] # Get the number of jobs that need pilots return max(0, waitingSupportedJobs - waitingPilots)