From def3a0b0ac52ff1badab479d0c8b92a7aa937859 Mon Sep 17 00:00:00 2001
From: ddavila <diego.davila@cern.ch>
Date: Tue, 3 Dec 2024 08:54:46 -0800
Subject: [PATCH] shrinking the namespace cached by MIT

---
 inventory/classes/common.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/inventory/classes/common.yml b/inventory/classes/common.yml
index a216acd..21a79de 100644
--- a/inventory/classes/common.yml
+++ b/inventory/classes/common.yml
@@ -331,12 +331,12 @@ parameters:
       running_glideins_total:
         curb: 3200
         max: 3500
-      # At wisconsin we only run MINIAOD
+      # If a) Site is UCSD or Caltech and any MINI or MINISIM OR b) Site==Wisconsin and only MINI data OR  c) Site==MIT and only a subset of MINI
       match_expr: >-
-        (glidein["attrs"].get("GLIDEIN_Country") in job["DESIRED_Overflow_Region"].split(",")) and ( glidein["attrs"].get("GLIDEIN_CMSSite") not in ["T2_US_Wisconsin", "T2_US_MIT"] or "MINIAODSIM" not in job["DESIRED_CMSDataset"] )
-      # Same idea,  UCSD and Caltech can get jobs looking for specific MINIAOD and MINIAODSIM whilst Wisconsin can only get jobs looking for MINIAOD.
+        ( glidein["attrs"].get("GLIDEIN_CMSSite") in ["T2_US_UCSD", "T2_US_Caltech"] ) or ( glidein["attrs"].get("GLIDEIN_CMSSite") in ["T2_US_Wisconsin"] and "MINIAODSIM" not in job["DESIRED_CMSDataset"] ) or ( glidein["attrs"].get("GLIDEIN_CMSSite") in ["T2_US_MIT"] and ( "UL2016" in job["DESIRED_CMSDataset"] or "UL2017" in job["DESIRED_CMSDataset"]))
+      # Same idea,  UCSD and Caltech can get jobs looking for any  MINIAOD and MINIAODSIM,  Wisconsin can only get jobs looking for MINIAOD and MIT only gets jobs looking for a subset of MINIAOD
       start_expr: >-
-        ifthenelse(CMS_ALLOW_OVERFLOW isnt undefined,CMS_ALLOW_OVERFLOW=?="True", undefined) &amp;&amp; (CRAB_UserRole=!="production") &amp;&amp; ifthenelse(DESIRED_Overflow_Region isnt undefined, stringListMember(GLIDEIN_Country,DESIRED_Overflow_Region),undefined) &amp;&amp;( ((GLIDEIN_CMSSite=?="T2_US_UCSD" || GLIDEIN_CMSSite=?="T2_US_Caltech") &amp;&amp; (regexp("/*/RunIISummer(19|20)UL(16|17|18).*/MINIAODSIM", DESIRED_CMSDataset) || regexp("/*/Run201[6,7,8].*/MINIAOD/.*UL201[6,7,8].*", DESIRED_CMSDataset))) || ((GLIDEIN_CMSSite=?="T2_US_Wisconsin" || GLIDEIN_CMSSite=?="T2_US_MIT") &amp;&amp; regexp("/*/Run201[6,7,8].*/MINIAOD/.*UL201[6,7,8].*", DESIRED_CMSDataset)) &amp;&amp; ( isUndefined(RequestGPUs) || RequestGPUs =?= 0 )
+        ifthenelse(CMS_ALLOW_OVERFLOW isnt undefined,CMS_ALLOW_OVERFLOW=?="True", undefined) &amp;&amp; (CRAB_UserRole=!="production") &amp;&amp; ifthenelse(DESIRED_Overflow_Region isnt undefined, stringListMember(GLIDEIN_Country,DESIRED_Overflow_Region),undefined) &amp;&amp;( ((GLIDEIN_CMSSite=?="T2_US_UCSD" || GLIDEIN_CMSSite=?="T2_US_Caltech") &amp;&amp; (regexp("/*/RunIISummer(19|20)UL(16|17|18).*/MINIAODSIM", DESIRED_CMSDataset) || regexp("/*/Run201[6,7,8].*/MINIAOD/.*UL201[6,7,8].*", DESIRED_CMSDataset))) || ( GLIDEIN_CMSSite=?="T2_US_Wisconsin"  &amp;&amp; regexp("/*/Run201[6,7,8].*/MINIAOD/.*UL201[6,7,8].*", DESIRED_CMSDataset) ) || ( GLIDEIN_CMSSite=?="T2_US_MIT"  &amp;&amp; regexp("/*/Run201[6,7].*/MINIAOD/.*UL201[6,7].*", DESIRED_CMSDataset) ) ) &amp;&amp; ( isUndefined(RequestGPUs) || RequestGPUs =?= 0 )
       factory_query_expr: >-
         (GLIDEIN_CMSSite=?="T2_US_UCSD" || GLIDEIN_CMSSite=?="T2_US_Caltech" || GLIDEIN_CMSSite=?="T2_US_Wisconsin" || GLIDEIN_CMSSite=?="T2_US_MIT") &amp;&amp; stringListMember("CMS",GLIDEIN_Supported_VOs) &amp;&amp; !ifthenelse(CMS_Local_Entry isnt undefined, CMS_Local_Entry, False)
       job_query_expr: >-
-- 
GitLab