Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 4 additions & 28 deletions src/DIRAC/Resources/Computing/HTCondorCEComputingElement.py
Comment thread
aldbr marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
from DIRAC.Resources.Computing.BatchSystems.Condor import HOLD_REASON_SUBCODE, parseCondorStatus, subTemplate
from DIRAC.Resources.Computing.ComputingElement import ComputingElement
from DIRAC.WorkloadManagementSystem.Client import PilotStatus
from DIRAC.WorkloadManagementSystem.Client.PilotManagerClient import PilotManagerClient

MANDATORY_PARAMETERS = ["Queue"]
DEFAULT_WORKINGDIRECTORY = "/opt/dirac/pro/runit/WorkloadManagement/SiteDirectorHT"
Expand Down Expand Up @@ -386,33 +385,10 @@ def killJob(self, jobIDList):

#############################################################################
def getCEStatus(self):
"""Method to return information on running and pending jobs.

Warning: information currently returned depends on the PilotManager and not HTCondor.
Results might be wrong if pilots or jobs are submitted manually via the CE.
"""
result = S_OK()
result["SubmittedJobs"] = 0
result["RunningJobs"] = 0
result["WaitingJobs"] = 0

# getWaitingPilots
condDict = {"DestinationSite": self.ceName, "Status": PilotStatus.PILOT_WAITING_STATES}
res = PilotManagerClient().countPilots(condDict)
if res["OK"]:
result["WaitingJobs"] = int(res["Value"])
else:
self.log.warn(f"Failure getting pilot count for {self.ceName}: {res['Message']} ")

# getRunningPilots
condDict = {"DestinationSite": self.ceName, "Status": PilotStatus.RUNNING}
res = PilotManagerClient().countPilots(condDict)
if res["OK"]:
result["RunningJobs"] = int(res["Value"])
else:
self.log.warn(f"Failure getting pilot count for {self.ceName}: {res['Message']} ")

return result
"""Method to return information on running and pending jobs."""
return S_ERROR(
"getCEStatus() not supported for HTCondorCEComputingElement: HTCondor does not expose this information"
)

def getJobStatus(self, jobIDList):
"""Get the status information for the given list of jobs"""
Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from typing import Any

import DIRAC
from DIRAC import S_ERROR, S_OK, gConfig
from DIRAC import S_ERROR, S_OK
from DIRAC.AccountingSystem.Client.DataStoreClient import gDataStoreClient
from DIRAC.AccountingSystem.Client.Types.Pilot import Pilot as PilotAccounting
from DIRAC.AccountingSystem.Client.Types.PilotSubmission import (
Expand Down
Loading