Skip to content

Commit

Permalink
feat (FTS3): change the default proxy lifetime to 36h
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed Nov 17, 2023
1 parent 07e4c58 commit 322af86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/DIRAC/DataManagementSystem/Agent/FTS3Agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
AGENT_NAME = "DataManagement/FTS3Agent"

# Lifetime in seconds of the proxy we download for submission
PROXY_LIFETIME = 43200 # 12 hours
# Because we force the redelegation if only a third is left,
# and we want to have a quiet night (~12h)
# let's make the lifetime 12*3 hours
PROXY_LIFETIME = 36 * 3600 # 36 hours

# Instead of querying many jobs at once,
# which maximizes the possibility of race condition
Expand Down
4 changes: 2 additions & 2 deletions src/DIRAC/DataManagementSystem/Client/FTS3Job.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,13 +763,13 @@ def generateContext(ftsServer, ucert, lifetime=25200):
# decides that there is not enough timeleft.
# At the moment, this is 1 hour, which effectively means that if you do
# not submit a job for more than 1h, you have no valid proxy in FTS servers
# anymore, and all the jobs failed.So we force it when
# anymore, and all the jobs failed. So we force it when
# one third of the lifetime will be left.
# Also, the proxy given as parameter might have less than "lifetime" left
# since it is cached, but it does not matter, because in the FTS3Agent
# we make sure that we renew it often enough
td_lifetime = datetime.timedelta(seconds=lifetime)
fts3.delegate(context, lifetime=td_lifetime, delegate_when_lifetime_lt=td_lifetime / 3)
fts3.delegate(context, lifetime=td_lifetime, delegate_when_lifetime_lt=td_lifetime // 3)

return S_OK(context)
except FTS3ClientException as e:
Expand Down
4 changes: 2 additions & 2 deletions src/DIRAC/DataManagementSystem/ConfigTemplate.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ Agents
KickAssignedHours = 1
# Max number of kicks per cycle
KickLimitPerCycle = 100
# Lifetime in sec of the Proxy we download to delegate to FTS3 (default 12h)
ProxyLifetime = 43200
# Lifetime in sec of the Proxy we download to delegate to FTS3 (default 36h)
ProxyLifetime = 129600
}
##END FTS3Agent
}

0 comments on commit 322af86

Please sign in to comment.