From 5b9221edd5c3e798fc9557dbc373365ca9db5681 Mon Sep 17 00:00:00 2001 From: Alan Malta Rodrigues Date: Fri, 22 Nov 2024 09:18:50 -0500 Subject: [PATCH] Fix T1 site cores ResourceControl logic Cast to integer --- .../WMComponent/AgentStatusWatcher/ResourceControlUpdater.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/WMComponent/AgentStatusWatcher/ResourceControlUpdater.py b/src/python/WMComponent/AgentStatusWatcher/ResourceControlUpdater.py index b64ee56635..efa1e9bdae 100644 --- a/src/python/WMComponent/AgentStatusWatcher/ResourceControlUpdater.py +++ b/src/python/WMComponent/AgentStatusWatcher/ResourceControlUpdater.py @@ -214,8 +214,8 @@ def checkSlotsChanges(self, infoRC, infoSSB): for site in set(infoRC).intersection(set(infoSSB)): if self.tier0Mode and site.startswith('T1_'): # T1 cores utilization for Tier0 - infoSSB[site]['slotsCPU'] *= self.t1SitesCores // 100 - infoSSB[site]['slotsIO'] *= self.t1SitesCores // 100 + infoSSB[site]['slotsCPU'] = int(infoSSB[site]['slotsCPU'] * self.t1SitesCores / 100) + infoSSB[site]['slotsIO'] = int(infoSSB[site]['slotsIO'] * self.t1SitesCores / 100) else: # round very small sites to the bare minimum infoSSB[site]['slotsCPU'] = max(infoSSB[site]['slotsCPU'], self.minCPUSlots)