Skip to content

Commit

Permalink
remove use of freeRSE. Fix #7714 (#7715)
Browse files Browse the repository at this point in the history
  • Loading branch information
belforte authored Jul 5, 2023
1 parent 1223cef commit 1411683
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/python/TaskWorker/Actions/DBSDataDiscovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def makeContainerFromBlockList(self, rucio=None, logger=None, blockList=None, co
logger.info("Rucio container %s:%s created with %d blocks", scope, containerName, len(blockList))

def whereToRecall(self, rucio=None, TBtoRecall=0, tapeLocations=None, logger=None):
# make RSEs lists
# make RSEs list
# asking for ddm_quota>0 gets rid also of Temp and Test RSE's
ALL_RSES = "ddm_quota>0&(tier=1|tier=2)&rse_type=DISK"
# tune list according to where tapes are, we expect a single location
Expand All @@ -547,7 +547,6 @@ def whereToRecall(self, rucio=None, TBtoRecall=0, tapeLocations=None, logger=Non
rses = rucio.list_rses(ALL_RSES)
rseNames = [r['rse'] for r in rses]
largeRSEs = [] # a list of largish (i.e. solid) RSEs
freeRSEs = [] # a subset of largeRSEs which also have quite some free space
for rse in rseNames:
if rse[2:6] == '_RU_': # avoid fragile sites, see #7400
continue
Expand All @@ -557,13 +556,8 @@ def whereToRecall(self, rucio=None, TBtoRecall=0, tapeLocations=None, logger=Non
size = usageDetails[0]['used'] # bytes
if float(size) / 1.e15 > 1.0: # more than 1 PB
largeRSEs.append(rse)
availableSpace = int(rucio.list_rse_attributes(rse)['ddm_quota']) # bytes
if availableSpace / 1e12 > 100: # at least 100TB available
freeRSEs.append(rse)
# sort lists so that duplicated rules can be spotted
# sort list so that duplicated rules can be spotted
largeRSEs.sort()
freeRSEs.sort()
# use either list (largeRSEs or freeRSEs) according to dataset size:
if TBtoRecall <= MAX_TB_TO_RECALL_AT_A_SINGLE_SITE: #
grouping = 'ALL'
logger.info("Will place all blocks at a single site")
Expand Down

0 comments on commit 1411683

Please sign in to comment.