From a1b31968197cc71d2060bf5586732941083d752d Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Thu, 18 Dec 2025 14:11:30 +0100 Subject: [PATCH] fix (FTS3): only use tokens if all hop support tokens --- src/DIRAC/DataManagementSystem/Client/FTS3Job.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/DIRAC/DataManagementSystem/Client/FTS3Job.py b/src/DIRAC/DataManagementSystem/Client/FTS3Job.py index 67e67086196..59565881919 100644 --- a/src/DIRAC/DataManagementSystem/Client/FTS3Job.py +++ b/src/DIRAC/DataManagementSystem/Client/FTS3Job.py @@ -411,6 +411,15 @@ def _constructTransferJob(self, pinTime, allLFNs, target_spacetoken, protocols=N log.debug(f"Multihop job has {len(allLFNs)} files while only 1 allowed") return S_ERROR(errno.E2BIG, "Trying multihop job with more than one file !") allHops = [(self.sourceSE, self.multiHopSE), (self.multiHopSE, self.targetSE)] + if tokensEnabled: + tokensEnabled = all( + [ + self.__seTokenSupport(StorageElement(seName)) + for seName in (self.sourceSE, self.multiHopSE, self.targetSE) + ] + ) + if not tokensEnabled: + log.warn("Not using token because not all hop supports it") isMultiHop = True else: allHops = [(self.sourceSE, self.targetSE)]