Skip to content

Commit 322af86

Browse files
committed
feat (FTS3): change the default proxy lifetime to 36h
1 parent 07e4c58 commit 322af86

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/DIRAC/DataManagementSystem/Agent/FTS3Agent.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@
4848
AGENT_NAME = "DataManagement/FTS3Agent"
4949

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

5356
# Instead of querying many jobs at once,
5457
# which maximizes the possibility of race condition

src/DIRAC/DataManagementSystem/Client/FTS3Job.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,13 +763,13 @@ def generateContext(ftsServer, ucert, lifetime=25200):
763763
# decides that there is not enough timeleft.
764764
# At the moment, this is 1 hour, which effectively means that if you do
765765
# not submit a job for more than 1h, you have no valid proxy in FTS servers
766-
# anymore, and all the jobs failed.So we force it when
766+
# anymore, and all the jobs failed. So we force it when
767767
# one third of the lifetime will be left.
768768
# Also, the proxy given as parameter might have less than "lifetime" left
769769
# since it is cached, but it does not matter, because in the FTS3Agent
770770
# we make sure that we renew it often enough
771771
td_lifetime = datetime.timedelta(seconds=lifetime)
772-
fts3.delegate(context, lifetime=td_lifetime, delegate_when_lifetime_lt=td_lifetime / 3)
772+
fts3.delegate(context, lifetime=td_lifetime, delegate_when_lifetime_lt=td_lifetime // 3)
773773

774774
return S_OK(context)
775775
except FTS3ClientException as e:

src/DIRAC/DataManagementSystem/ConfigTemplate.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ Agents
155155
KickAssignedHours = 1
156156
# Max number of kicks per cycle
157157
KickLimitPerCycle = 100
158-
# Lifetime in sec of the Proxy we download to delegate to FTS3 (default 12h)
159-
ProxyLifetime = 43200
158+
# Lifetime in sec of the Proxy we download to delegate to FTS3 (default 36h)
159+
ProxyLifetime = 129600
160160
}
161161
##END FTS3Agent
162162
}

0 commit comments

Comments
 (0)