Skip to content
Open
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
11 changes: 9 additions & 2 deletions src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,7 @@ def _submitPilotsPerQueue(self, queueName: str):
ce = self.queueDict[queueName]["CE"]

# Set credentials
cpuTime = queueCPUTime + 86400
result = self._setCredentials(ce, cpuTime)
result = self._setCredentials(ce, queueCPUTime)
if not result["OK"]:
self.log.error("Failed to set credentials:", result["Message"])
return result
Expand Down Expand Up @@ -924,11 +923,19 @@ def _setCredentials(self, ce: ComputingElement, proxyMinimumRequiredValidity: in

# Generate a new proxy if needed
if getNewProxy:
proxyMinimumRequiredValidity = proxyMinimumRequiredValidity + 86400
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about having a fixed proxyDuration of 86400 seconds (should it be configurable in the CS?).
We always tries to generate a proxy lasting proxyDuration seconds and we compare it against proxyMinimumRequiredValidity in setCredentials().

Since the pilot bundles its own proxy, the proxy used by the Site Director is only useful to interact with the CE, am I wrong? So the proxyMinimumRequiredValidity should always be rather low.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This proxy is indeed only for interacting with the CE, but it's not only for submission of the pilot: it is also for monitoring its status. So, it should actually be quite long.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, so what do you think? Is 86400 seconds not long enough? (VOs will anyway be limited by the maximum duration setting)

Then for submitting jobs, proxyMinimumRequiredValidity could be just 1h, and for monitoring may be slightly more.

self.log.verbose("Getting pilot proxy", f"for {self.pilotDN}/{self.vo} {proxyMinimumRequiredValidity} long")
pilotGroup = Operations(vo=self.vo).getValue("Pilot/GenericPilotGroup")
result = gProxyManager.getPilotProxyFromDIRACGroup(self.pilotDN, pilotGroup, proxyMinimumRequiredValidity)
if not result["OK"]:
return result
result_validity = result["Value"].getRemainingSecs()
if not result_validity["OK"]:
return result_validity
if result_validity["Value"] < proxyMinimumRequiredValidity:
self.log.warn(
f"The validity of the generated proxy ({result_validity['Value']} seconds) is less than the requested {proxyMinimumRequiredValidity} seconds"
)
ce.setProxy(result["Value"])

# Get valid token if needed
Expand Down
Loading