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
1 change: 1 addition & 0 deletions DataManagementSystem/Client/FTS3Job.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ def _constructTransferJob(self, pinTime, allLFNs, target_spacetoken, protocols=N
bring_online=bring_online,
copy_pin_lifetime=copy_pin_lifetime,
retry=3,
verify_checksum='target', # Only check target vs specified, since we verify the source earlier
multihop=bool(allStageURLs), # if we have stage urls, then we need multihop
metadata=job_metadata,
priority=self.priority)
Expand Down
18 changes: 16 additions & 2 deletions DataManagementSystem/scripts/dirac-dms-protocol-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
Script.registerSwitch('', 'TargetSE=', 'SE1[,SE2,...]')
Script.registerSwitch('', 'OutputFile=', 'CSV output file (default /tmp/protocol-matrix.csv)')
Script.registerSwitch('', 'Bidirection', 'If FromSE or TargetSE are specified, make a square matrix ')
Script.registerSwitch('', 'FTSOnly', 'Only desplay the protocols sent to FTS')
Script.registerSwitch('', 'ExcludeSE=', 'SEs to not take into account for the matrix')
Script.setUsageMessage('\n'.join([__doc__,
'Usage:',
' %s [option|cfgfile] % Script.scriptName']))
Expand All @@ -62,17 +64,23 @@

fromSE = []
targetSE = []
excludeSE = []
outputFile = '/tmp/protocol-matrix.csv'
bidirection = False
ftsOnly = False
for switch in Script.getUnprocessedSwitches():
if switch[0] == 'FromSE':
fromSE = switch[1].split(',')
elif switch[0] == 'TargetSE':
targetSE = switch[1].split(',')
elif switch[0] == 'ExcludeSE':
excludeSE = switch[1].split(',')
elif switch[0] == 'OutputFile':
outputFile = switch[1]
elif switch[0] == 'Bidirection':
bidirection = True
elif switch[0] == 'FTSOnly':
ftsOnly = True

thirdPartyProtocols = DMSHelpers().getThirdPartyProtocols()

Expand All @@ -83,6 +91,9 @@

allSEs = gConfig.getSections('/Resources/StorageElements/')['Value']

# Remove the SEs that we want to exclude
allSEs = set(allSEs) - set(excludeSE)

# We go through all the SEs and fill in the seForSEBases dict.
# Basically, at the end of the loop, the dict will contain
# for each baseSE an entry corresponding to one real storage (the first one)
Expand Down Expand Up @@ -129,7 +140,7 @@
# Now we construct the SE object for each SE that we want to appear
ses = {}
for se in set(fromSE + targetSE):
ses[se] = StorageElement(seForSeBases[se])
ses[se] = StorageElement(seForSeBases.get(se, se))

ret = getVOfromProxyGroup()
if not ret['OK'] or not ret.get('Value', ''):
Expand All @@ -156,7 +167,10 @@

# Add also the third party protocols
proto = ','.join(ses[dst].negociateProtocolWithOtherSE(ses[src], thirdPartyProtocols)['Value'])
tpMatrix[src][dst] = '%s (%s)' % (surls, proto)
if ftsOnly:
tpMatrix[src][dst] = '%s' % surls
else:
tpMatrix[src][dst] = '%s (%s)' % (surls, proto)
gLogger.verbose("%s -> %s: %s" % (src, dst, surls))
gLogger.verbose("%s -> %s: %s" % (src, dst, proto))

Expand Down
7 changes: 4 additions & 3 deletions RequestManagementSystem/Client/ReqClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,12 +502,13 @@ def printFTSJobs(request):
for fts3Op in res['Value']:
associatedFTS3Jobs.extend(fts3Op.ftsJobs)
if associatedFTS3Jobs:
# Display the direct url and the status
gLogger.always(
'\n\nFTS3 jobs associated: \n%s' %
'\n'.join(
'%s@%s (%s)' %
(job.ftsGUID,
job.ftsServer,
'%s/fts3/ftsmon/#/job/%s (%s)' %
(job.ftsServer.replace(':8446', ':8449'), # Submission port is 8446, web port is 8449
job.ftsGUID,
job.status) for job in associatedFTS3Jobs))
return

Expand Down