reqmgr2 2.3.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- PSetTweaks/PSetTweak.py +449 -0
- PSetTweaks/WMTweak.py +621 -0
- PSetTweaks/__init__.py +3 -0
- Utils/CPMetrics.py +270 -0
- Utils/CertTools.py +62 -0
- Utils/EmailAlert.py +50 -0
- Utils/ExtendedUnitTestCase.py +62 -0
- Utils/FileTools.py +182 -0
- Utils/IteratorTools.py +80 -0
- Utils/MathUtils.py +31 -0
- Utils/MemoryCache.py +119 -0
- Utils/Patterns.py +24 -0
- Utils/Pipeline.py +137 -0
- Utils/PortForward.py +97 -0
- Utils/ProcessStats.py +103 -0
- Utils/PythonVersion.py +17 -0
- Utils/Signals.py +36 -0
- Utils/TemporaryEnvironment.py +27 -0
- Utils/Throttled.py +227 -0
- Utils/Timers.py +130 -0
- Utils/Timestamps.py +86 -0
- Utils/TokenManager.py +143 -0
- Utils/Tracing.py +60 -0
- Utils/TwPrint.py +98 -0
- Utils/Utilities.py +308 -0
- Utils/__init__.py +11 -0
- WMCore/ACDC/Collection.py +57 -0
- WMCore/ACDC/CollectionTypes.py +12 -0
- WMCore/ACDC/CouchCollection.py +67 -0
- WMCore/ACDC/CouchFileset.py +238 -0
- WMCore/ACDC/CouchService.py +73 -0
- WMCore/ACDC/DataCollectionService.py +485 -0
- WMCore/ACDC/Fileset.py +94 -0
- WMCore/ACDC/__init__.py +11 -0
- WMCore/Algorithms/Alarm.py +39 -0
- WMCore/Algorithms/MathAlgos.py +274 -0
- WMCore/Algorithms/MiscAlgos.py +67 -0
- WMCore/Algorithms/ParseXMLFile.py +115 -0
- WMCore/Algorithms/Permissions.py +27 -0
- WMCore/Algorithms/Singleton.py +58 -0
- WMCore/Algorithms/SubprocessAlgos.py +129 -0
- WMCore/Algorithms/__init__.py +7 -0
- WMCore/Cache/GenericDataCache.py +98 -0
- WMCore/Cache/WMConfigCache.py +572 -0
- WMCore/Cache/__init__.py +0 -0
- WMCore/Configuration.py +651 -0
- WMCore/DAOFactory.py +47 -0
- WMCore/DataStructs/File.py +177 -0
- WMCore/DataStructs/Fileset.py +140 -0
- WMCore/DataStructs/Job.py +182 -0
- WMCore/DataStructs/JobGroup.py +142 -0
- WMCore/DataStructs/JobPackage.py +49 -0
- WMCore/DataStructs/LumiList.py +734 -0
- WMCore/DataStructs/Mask.py +219 -0
- WMCore/DataStructs/MathStructs/ContinuousSummaryHistogram.py +197 -0
- WMCore/DataStructs/MathStructs/DiscreteSummaryHistogram.py +92 -0
- WMCore/DataStructs/MathStructs/SummaryHistogram.py +117 -0
- WMCore/DataStructs/MathStructs/__init__.py +0 -0
- WMCore/DataStructs/Pickleable.py +24 -0
- WMCore/DataStructs/Run.py +256 -0
- WMCore/DataStructs/Subscription.py +175 -0
- WMCore/DataStructs/WMObject.py +47 -0
- WMCore/DataStructs/WorkUnit.py +112 -0
- WMCore/DataStructs/Workflow.py +60 -0
- WMCore/DataStructs/__init__.py +8 -0
- WMCore/Database/CMSCouch.py +1349 -0
- WMCore/Database/ConfigDBMap.py +29 -0
- WMCore/Database/CouchUtils.py +118 -0
- WMCore/Database/DBCore.py +198 -0
- WMCore/Database/DBCreator.py +113 -0
- WMCore/Database/DBExceptionHandler.py +57 -0
- WMCore/Database/DBFactory.py +110 -0
- WMCore/Database/DBFormatter.py +177 -0
- WMCore/Database/Dialects.py +13 -0
- WMCore/Database/ExecuteDAO.py +327 -0
- WMCore/Database/MongoDB.py +241 -0
- WMCore/Database/MySQL/Destroy.py +42 -0
- WMCore/Database/MySQL/ListUserContent.py +20 -0
- WMCore/Database/MySQL/__init__.py +9 -0
- WMCore/Database/MySQLCore.py +132 -0
- WMCore/Database/Oracle/Destroy.py +56 -0
- WMCore/Database/Oracle/ListUserContent.py +19 -0
- WMCore/Database/Oracle/__init__.py +9 -0
- WMCore/Database/ResultSet.py +44 -0
- WMCore/Database/Transaction.py +91 -0
- WMCore/Database/__init__.py +9 -0
- WMCore/Database/ipy_profile_couch.py +438 -0
- WMCore/FwkJobReport/FileInfo.py +131 -0
- WMCore/FwkJobReport/Report.py +1646 -0
- WMCore/FwkJobReport/ReportEmu.py +122 -0
- WMCore/FwkJobReport/XMLParser.py +606 -0
- WMCore/FwkJobReport/__init__.py +15 -0
- WMCore/GroupUser/CouchObject.py +127 -0
- WMCore/GroupUser/Decorators.py +51 -0
- WMCore/GroupUser/Group.py +33 -0
- WMCore/GroupUser/Interface.py +73 -0
- WMCore/GroupUser/User.py +96 -0
- WMCore/GroupUser/__init__.py +11 -0
- WMCore/Lexicon.py +836 -0
- WMCore/REST/Auth.py +202 -0
- WMCore/REST/CherryPyPeriodicTask.py +166 -0
- WMCore/REST/Error.py +333 -0
- WMCore/REST/Format.py +642 -0
- WMCore/REST/HeartbeatMonitorBase.py +90 -0
- WMCore/REST/Main.py +623 -0
- WMCore/REST/Server.py +2435 -0
- WMCore/REST/Services.py +24 -0
- WMCore/REST/Test.py +120 -0
- WMCore/REST/Tools.py +38 -0
- WMCore/REST/Validation.py +250 -0
- WMCore/REST/__init__.py +1 -0
- WMCore/ReqMgr/CherryPyThreads/AuxCacheUpdateTasks.py +31 -0
- WMCore/ReqMgr/CherryPyThreads/BuildParentLock.py +116 -0
- WMCore/ReqMgr/CherryPyThreads/CouchDBCleanup.py +110 -0
- WMCore/ReqMgr/CherryPyThreads/HeartbeatMonitor.py +154 -0
- WMCore/ReqMgr/CherryPyThreads/StatusChangeTasks.py +131 -0
- WMCore/ReqMgr/CherryPyThreads/StepChainParentageFixTask.py +104 -0
- WMCore/ReqMgr/CherryPyThreads/__init__.py +0 -0
- WMCore/ReqMgr/DataStructs/AuthzByStatus.py +113 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/CAMPAIGN_CONFIG.py +116 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/DAS_RESULT_FILTER.py +3 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/EDITABLE_SPLITTING_PARAM_CONFIG.py +42 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/UNIFIED_CONFIG.py +240 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/__init__.py +0 -0
- WMCore/ReqMgr/DataStructs/ReqMgrConfigDataCache.py +65 -0
- WMCore/ReqMgr/DataStructs/Request.py +293 -0
- WMCore/ReqMgr/DataStructs/RequestError.py +21 -0
- WMCore/ReqMgr/DataStructs/RequestStatus.py +209 -0
- WMCore/ReqMgr/DataStructs/RequestType.py +13 -0
- WMCore/ReqMgr/DataStructs/__init__.py +0 -0
- WMCore/ReqMgr/ReqMgrCouch.py +74 -0
- WMCore/ReqMgr/Service/Auxiliary.py +319 -0
- WMCore/ReqMgr/Service/RegExp.py +16 -0
- WMCore/ReqMgr/Service/Request.py +681 -0
- WMCore/ReqMgr/Service/RequestAdditionalInfo.py +317 -0
- WMCore/ReqMgr/Service/RestApiHub.py +68 -0
- WMCore/ReqMgr/Service/WMStatsInfo.py +46 -0
- WMCore/ReqMgr/Service/__init__.py +0 -0
- WMCore/ReqMgr/Tools/__init__.py +0 -0
- WMCore/ReqMgr/Tools/cms.py +243 -0
- WMCore/ReqMgr/Utils/AuxValidation.py +53 -0
- WMCore/ReqMgr/Utils/Validation.py +341 -0
- WMCore/ReqMgr/Utils/__init__.py +0 -0
- WMCore/ReqMgr/Web/ReqMgrService.py +780 -0
- WMCore/ReqMgr/Web/__init__.py +0 -0
- WMCore/ReqMgr/Web/tools.py +211 -0
- WMCore/ReqMgr/Web/utils.py +291 -0
- WMCore/ReqMgr/WebGui/FrontPage.py +38 -0
- WMCore/ReqMgr/WebGui/__init__.py +0 -0
- WMCore/ReqMgr/__init__.py +1 -0
- WMCore/Services/AlertManager/AlertManagerAPI.py +111 -0
- WMCore/Services/AlertManager/__init__.py +0 -0
- WMCore/Services/CRIC/CRIC.py +238 -0
- WMCore/Services/CRIC/__init__.py +0 -0
- WMCore/Services/DBS/DBS3Reader.py +1044 -0
- WMCore/Services/DBS/DBSConcurrency.py +44 -0
- WMCore/Services/DBS/DBSErrors.py +113 -0
- WMCore/Services/DBS/DBSReader.py +23 -0
- WMCore/Services/DBS/DBSUtils.py +139 -0
- WMCore/Services/DBS/DBSWriterObjects.py +381 -0
- WMCore/Services/DBS/ProdException.py +133 -0
- WMCore/Services/DBS/__init__.py +8 -0
- WMCore/Services/FWJRDB/FWJRDBAPI.py +118 -0
- WMCore/Services/FWJRDB/__init__.py +0 -0
- WMCore/Services/HTTPS/HTTPSAuthHandler.py +66 -0
- WMCore/Services/HTTPS/__init__.py +0 -0
- WMCore/Services/LogDB/LogDB.py +201 -0
- WMCore/Services/LogDB/LogDBBackend.py +191 -0
- WMCore/Services/LogDB/LogDBExceptions.py +11 -0
- WMCore/Services/LogDB/LogDBReport.py +85 -0
- WMCore/Services/LogDB/__init__.py +0 -0
- WMCore/Services/MSPileup/__init__.py +0 -0
- WMCore/Services/MSUtils/MSUtils.py +54 -0
- WMCore/Services/MSUtils/__init__.py +0 -0
- WMCore/Services/McM/McM.py +173 -0
- WMCore/Services/McM/__init__.py +8 -0
- WMCore/Services/MonIT/Grafana.py +133 -0
- WMCore/Services/MonIT/__init__.py +0 -0
- WMCore/Services/PyCondor/PyCondorAPI.py +154 -0
- WMCore/Services/PyCondor/PyCondorUtils.py +105 -0
- WMCore/Services/PyCondor/__init__.py +0 -0
- WMCore/Services/ReqMgr/ReqMgr.py +261 -0
- WMCore/Services/ReqMgr/__init__.py +0 -0
- WMCore/Services/ReqMgrAux/ReqMgrAux.py +419 -0
- WMCore/Services/ReqMgrAux/__init__.py +0 -0
- WMCore/Services/RequestDB/RequestDBReader.py +267 -0
- WMCore/Services/RequestDB/RequestDBWriter.py +39 -0
- WMCore/Services/RequestDB/__init__.py +0 -0
- WMCore/Services/Requests.py +624 -0
- WMCore/Services/Rucio/Rucio.py +1287 -0
- WMCore/Services/Rucio/RucioUtils.py +74 -0
- WMCore/Services/Rucio/__init__.py +0 -0
- WMCore/Services/RucioConMon/RucioConMon.py +128 -0
- WMCore/Services/RucioConMon/__init__.py +0 -0
- WMCore/Services/Service.py +400 -0
- WMCore/Services/StompAMQ/__init__.py +0 -0
- WMCore/Services/TagCollector/TagCollector.py +155 -0
- WMCore/Services/TagCollector/XMLUtils.py +98 -0
- WMCore/Services/TagCollector/__init__.py +0 -0
- WMCore/Services/UUIDLib.py +13 -0
- WMCore/Services/UserFileCache/UserFileCache.py +160 -0
- WMCore/Services/UserFileCache/__init__.py +8 -0
- WMCore/Services/WMAgent/WMAgent.py +63 -0
- WMCore/Services/WMAgent/__init__.py +0 -0
- WMCore/Services/WMArchive/CMSSWMetrics.py +526 -0
- WMCore/Services/WMArchive/DataMap.py +463 -0
- WMCore/Services/WMArchive/WMArchive.py +33 -0
- WMCore/Services/WMArchive/__init__.py +0 -0
- WMCore/Services/WMBS/WMBS.py +97 -0
- WMCore/Services/WMBS/__init__.py +0 -0
- WMCore/Services/WMStats/DataStruct/RequestInfoCollection.py +300 -0
- WMCore/Services/WMStats/DataStruct/__init__.py +0 -0
- WMCore/Services/WMStats/WMStatsPycurl.py +145 -0
- WMCore/Services/WMStats/WMStatsReader.py +445 -0
- WMCore/Services/WMStats/WMStatsWriter.py +273 -0
- WMCore/Services/WMStats/__init__.py +0 -0
- WMCore/Services/WMStatsServer/WMStatsServer.py +134 -0
- WMCore/Services/WMStatsServer/__init__.py +0 -0
- WMCore/Services/WorkQueue/WorkQueue.py +492 -0
- WMCore/Services/WorkQueue/__init__.py +0 -0
- WMCore/Services/__init__.py +8 -0
- WMCore/Services/pycurl_manager.py +574 -0
- WMCore/Storage/Backends/AWSS3Impl.py +110 -0
- WMCore/Storage/Backends/CPImpl.py +125 -0
- WMCore/Storage/Backends/FNALImpl.py +229 -0
- WMCore/Storage/Backends/GFAL2Impl.py +260 -0
- WMCore/Storage/Backends/LCGImpl.py +236 -0
- WMCore/Storage/Backends/SRMV2Impl.py +248 -0
- WMCore/Storage/Backends/TestFallbackToOldBackend.py +130 -0
- WMCore/Storage/Backends/UnittestImpl.py +188 -0
- WMCore/Storage/Backends/VandyImpl.py +110 -0
- WMCore/Storage/Backends/XRDCPImpl.py +314 -0
- WMCore/Storage/Backends/__init__.py +29 -0
- WMCore/Storage/DeleteMgr.py +255 -0
- WMCore/Storage/Execute.py +82 -0
- WMCore/Storage/FileManager.py +448 -0
- WMCore/Storage/Plugins/CPImpl.py +45 -0
- WMCore/Storage/Plugins/Examples/SRMV2Impl.py +188 -0
- WMCore/Storage/Plugins/Examples/XRDCPImpl.py +64 -0
- WMCore/Storage/Plugins/Examples/__init__.py +1 -0
- WMCore/Storage/Plugins/FNALImpl.py +329 -0
- WMCore/Storage/Plugins/GFAL2Impl.py +84 -0
- WMCore/Storage/Plugins/LCGImpl.py +91 -0
- WMCore/Storage/Plugins/TestFailImpl.py +33 -0
- WMCore/Storage/Plugins/TestLocalCopyImpl.py +48 -0
- WMCore/Storage/Plugins/TestWinImpl.py +28 -0
- WMCore/Storage/Plugins/VandyImpl.py +109 -0
- WMCore/Storage/Plugins/__init__.py +17 -0
- WMCore/Storage/Registry.py +105 -0
- WMCore/Storage/RucioFileCatalog.py +247 -0
- WMCore/Storage/SiteLocalConfig.py +353 -0
- WMCore/Storage/StageInMgr.py +257 -0
- WMCore/Storage/StageOutError.py +69 -0
- WMCore/Storage/StageOutImpl.py +303 -0
- WMCore/Storage/StageOutImplV2.py +97 -0
- WMCore/Storage/StageOutMgr.py +390 -0
- WMCore/Storage/StoreFail.py +73 -0
- WMCore/Storage/TestImpl.py +71 -0
- WMCore/Storage/TrivialFileCatalog.py +383 -0
- WMCore/Storage/__init__.py +0 -0
- WMCore/WMBase.py +50 -0
- WMCore/WMConnectionBase.py +164 -0
- WMCore/WMException.py +183 -0
- WMCore/WMExceptions.py +269 -0
- WMCore/WMFactory.py +76 -0
- WMCore/WMInit.py +228 -0
- WMCore/WMLogging.py +108 -0
- WMCore/WMRuntime/Bootstrap.py +459 -0
- WMCore/WMRuntime/Monitors/PerformanceMonitor.py +308 -0
- WMCore/WMRuntime/Monitors/TestMonitor.py +197 -0
- WMCore/WMRuntime/Monitors/WMRuntimeMonitor.py +115 -0
- WMCore/WMRuntime/Monitors/__init__.py +8 -0
- WMCore/WMRuntime/ProcessMonitor.py +157 -0
- WMCore/WMRuntime/Sandbox.py +56 -0
- WMCore/WMRuntime/SandboxCreator.py +199 -0
- WMCore/WMRuntime/ScriptFactory.py +53 -0
- WMCore/WMRuntime/ScriptInterface.py +30 -0
- WMCore/WMRuntime/ScriptInvoke.py +120 -0
- WMCore/WMRuntime/Scripts/SetupCMSSWPset.py +826 -0
- WMCore/WMRuntime/Scripts/__init__.py +7 -0
- WMCore/WMRuntime/Startup.py +57 -0
- WMCore/WMRuntime/StepSpace.py +75 -0
- WMCore/WMRuntime/TaskSpace.py +144 -0
- WMCore/WMRuntime/Tools/Plugins/__init__.py +7 -0
- WMCore/WMRuntime/Tools/Scram.py +465 -0
- WMCore/WMRuntime/Tools/__init__.py +8 -0
- WMCore/WMRuntime/Unpacker.py +175 -0
- WMCore/WMRuntime/Watchdog.py +329 -0
- WMCore/WMRuntime/__init__.py +8 -0
- WMCore/WMSpec/ConfigSectionTree.py +442 -0
- WMCore/WMSpec/Makers/Handlers/MakeJob.py +46 -0
- WMCore/WMSpec/Makers/Handlers/MakeJobSlave.py +66 -0
- WMCore/WMSpec/Makers/Handlers/__init__.py +9 -0
- WMCore/WMSpec/Makers/Interface/CreateWorkArea.py +466 -0
- WMCore/WMSpec/Makers/Interface/__init__.py +9 -0
- WMCore/WMSpec/Makers/JobMaker.py +33 -0
- WMCore/WMSpec/Makers/TaskMaker.py +229 -0
- WMCore/WMSpec/Makers/__init__.py +9 -0
- WMCore/WMSpec/Persistency.py +135 -0
- WMCore/WMSpec/StdSpecs/DQMHarvest.py +156 -0
- WMCore/WMSpec/StdSpecs/DataProcessing.py +75 -0
- WMCore/WMSpec/StdSpecs/Express.py +506 -0
- WMCore/WMSpec/StdSpecs/PromptReco.py +220 -0
- WMCore/WMSpec/StdSpecs/ReReco.py +280 -0
- WMCore/WMSpec/StdSpecs/Repack.py +219 -0
- WMCore/WMSpec/StdSpecs/Resubmission.py +213 -0
- WMCore/WMSpec/StdSpecs/StdBase.py +1412 -0
- WMCore/WMSpec/StdSpecs/StepChain.py +672 -0
- WMCore/WMSpec/StdSpecs/StoreResults.py +124 -0
- WMCore/WMSpec/StdSpecs/TaskChain.py +777 -0
- WMCore/WMSpec/StdSpecs/__init__.py +9 -0
- WMCore/WMSpec/Steps/BuildMaster.py +87 -0
- WMCore/WMSpec/Steps/BuildTools.py +201 -0
- WMCore/WMSpec/Steps/Builder.py +97 -0
- WMCore/WMSpec/Steps/Builders/AlcaHarvest.py +31 -0
- WMCore/WMSpec/Steps/Builders/CMSSW.py +34 -0
- WMCore/WMSpec/Steps/Builders/DQMUpload.py +34 -0
- WMCore/WMSpec/Steps/Builders/DeleteFiles.py +34 -0
- WMCore/WMSpec/Steps/Builders/LogArchive.py +34 -0
- WMCore/WMSpec/Steps/Builders/LogCollect.py +34 -0
- WMCore/WMSpec/Steps/Builders/StageOut.py +34 -0
- WMCore/WMSpec/Steps/Builders/__init__.py +8 -0
- WMCore/WMSpec/Steps/Diagnostic.py +89 -0
- WMCore/WMSpec/Steps/Diagnostics/AlcaHarvest.py +72 -0
- WMCore/WMSpec/Steps/Diagnostics/CMSSW.py +302 -0
- WMCore/WMSpec/Steps/Diagnostics/DQMUpload.py +70 -0
- WMCore/WMSpec/Steps/Diagnostics/DeleteFiles.py +67 -0
- WMCore/WMSpec/Steps/Diagnostics/Generic.py +18 -0
- WMCore/WMSpec/Steps/Diagnostics/LogArchive.py +76 -0
- WMCore/WMSpec/Steps/Diagnostics/LogCollect.py +80 -0
- WMCore/WMSpec/Steps/Diagnostics/StageOut.py +77 -0
- WMCore/WMSpec/Steps/Diagnostics/__init__.py +8 -0
- WMCore/WMSpec/Steps/Emulator.py +62 -0
- WMCore/WMSpec/Steps/Emulators/AlcaHarvest.py +50 -0
- WMCore/WMSpec/Steps/Emulators/CMSSW.py +52 -0
- WMCore/WMSpec/Steps/Emulators/DQMUpload.py +50 -0
- WMCore/WMSpec/Steps/Emulators/DeleteFiles.py +50 -0
- WMCore/WMSpec/Steps/Emulators/LogArchive.py +83 -0
- WMCore/WMSpec/Steps/Emulators/LogCollect.py +66 -0
- WMCore/WMSpec/Steps/Emulators/StageOut.py +50 -0
- WMCore/WMSpec/Steps/Emulators/__init__.py +10 -0
- WMCore/WMSpec/Steps/ExecuteMaster.py +208 -0
- WMCore/WMSpec/Steps/Executor.py +210 -0
- WMCore/WMSpec/Steps/Executors/AlcaHarvest.py +206 -0
- WMCore/WMSpec/Steps/Executors/CMSSW.py +473 -0
- WMCore/WMSpec/Steps/Executors/DQMUpload.py +295 -0
- WMCore/WMSpec/Steps/Executors/DeleteFiles.py +161 -0
- WMCore/WMSpec/Steps/Executors/LogArchive.py +309 -0
- WMCore/WMSpec/Steps/Executors/LogCollect.py +284 -0
- WMCore/WMSpec/Steps/Executors/StageOut.py +325 -0
- WMCore/WMSpec/Steps/Executors/__init__.py +8 -0
- WMCore/WMSpec/Steps/Fetchers/CMSSWFetcher.py +49 -0
- WMCore/WMSpec/Steps/Fetchers/FetcherInterface.py +45 -0
- WMCore/WMSpec/Steps/Fetchers/PileupFetcher.py +247 -0
- WMCore/WMSpec/Steps/Fetchers/URLFetcher.py +61 -0
- WMCore/WMSpec/Steps/Fetchers/__init__.py +9 -0
- WMCore/WMSpec/Steps/StepFactory.py +213 -0
- WMCore/WMSpec/Steps/TaskEmulator.py +75 -0
- WMCore/WMSpec/Steps/Template.py +204 -0
- WMCore/WMSpec/Steps/Templates/AlcaHarvest.py +76 -0
- WMCore/WMSpec/Steps/Templates/CMSSW.py +613 -0
- WMCore/WMSpec/Steps/Templates/DQMUpload.py +59 -0
- WMCore/WMSpec/Steps/Templates/DeleteFiles.py +70 -0
- WMCore/WMSpec/Steps/Templates/LogArchive.py +84 -0
- WMCore/WMSpec/Steps/Templates/LogCollect.py +105 -0
- WMCore/WMSpec/Steps/Templates/StageOut.py +105 -0
- WMCore/WMSpec/Steps/Templates/__init__.py +10 -0
- WMCore/WMSpec/Steps/WMExecutionFailure.py +21 -0
- WMCore/WMSpec/Steps/__init__.py +8 -0
- WMCore/WMSpec/Utilities.py +63 -0
- WMCore/WMSpec/WMSpecErrors.py +12 -0
- WMCore/WMSpec/WMStep.py +347 -0
- WMCore/WMSpec/WMTask.py +1980 -0
- WMCore/WMSpec/WMWorkload.py +2288 -0
- WMCore/WMSpec/WMWorkloadTools.py +370 -0
- WMCore/WMSpec/__init__.py +9 -0
- WMCore/WorkQueue/DataStructs/CouchWorkQueueElement.py +148 -0
- WMCore/WorkQueue/DataStructs/WorkQueueElement.py +274 -0
- WMCore/WorkQueue/DataStructs/__init__.py +0 -0
- WMCore/WorkQueue/__init__.py +13 -0
- WMCore/Wrappers/JsonWrapper/JSONThunker.py +342 -0
- WMCore/Wrappers/JsonWrapper/__init__.py +7 -0
- WMCore/Wrappers/__init__.py +6 -0
- WMCore/__init__.py +10 -0
- reqmgr2-2.3.10.data/data/bin/wmc-dist-patch +15 -0
- reqmgr2-2.3.10.data/data/bin/wmc-dist-unpatch +8 -0
- reqmgr2-2.3.10.data/data/bin/wmc-httpd +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/_id +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/couchapp.json +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/language +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/config_by_label/map.js +12 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/config_by_md5hash/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/config_by_owner/map.js +15 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/config_by_psethash/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/config_type/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/group_name/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/groups/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/groups/reduce.js +12 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/owner_name_group/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/runseq_by_owner/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/runsequence_type/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/seedseq_by_owner/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/types/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/_id +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/couchapp.json +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/language +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/updates/totalstats.js +39 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/updates/updaterequest.js +105 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/validate_doc_update.js +6 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bycampaign/map.js +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bydatapileup/map.js +21 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bydate/map.js +14 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byinputdataset/map.js +21 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bymcpileup/map.js +21 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byoriginalrequest/map.js +6 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byoutputdataset/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byparentageflag/map.js +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byprepid/map.js +22 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byrequest/map.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bystatus/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bystatusandrequestor/map.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bystatusandtime/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bystatusandtypeandrequestor/map.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byteamandstatus/map.js +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bytype/map.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/childresubmissionrequests/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/requestsbystatusandtype/map.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/requestsincludeparents/map.js +11 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/_id +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/couchapp.json +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/filters/filterDeletedDocs.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/language +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/validate_doc_update.js +6 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/views/byconfig/map.js +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/ColVis.css +76 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/font-awesome.min.css +4 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-check-16.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-cross-16.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-plus-16.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-square-check-16.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/cms_logo.gif +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/cms_logo.jpeg +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_highlight-hard_55_5c9ccc_1x100.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_inset-soft_100_fcfdfd_1x100.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_217bc0_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_2694e8_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_2e83ff_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_469bdd_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_6da8d5_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_d8e7f3_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_f9bd01_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/warning-16.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/jquery-ui-1.12.0.css +1312 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/jquery.dataTables.css +241 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/logdb.css +60 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/main_layout.css +565 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/FontAwesome.otf +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.eot +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.svg +565 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.ttf +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.woff +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.woff2 +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/Sorting icons.psd +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/back_disabled.jpg +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/back_enabled.jpg +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/error.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/favicon.ico +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/forward_disabled.jpg +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/forward_enabled.jpg +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/loader-1.gif +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/module.caption.backg.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/module.caption.backg.rolledup.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/rollup.gif +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_asc.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_asc_disabled.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_both.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_desc.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_desc_disabled.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/stable.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/warning.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html +105 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html.min +106 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html.org +125 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.ActiveRequestController.js +61 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.GenericController.js +38 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.WorkloadSummaryController.js +12 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/import.js +6 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T0/WMStats.RequestSummary.js +71 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T0/WMStats.RunSummary.js +70 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.AgentRequestSummary.js +28 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.CMSSWSummary.js +28 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.CampaignSummary.js +28 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.ReqMgrRequest.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.RequestSummary.js +190 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Agents.js +98 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Alerts.js +21 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Campaigns.js +25 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.GenericRequests.js +728 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.History.js +78 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.JobDetails.js +19 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.JobSummary.js +32 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.LogDBData.js +93 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.LogMessage.js +38 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.SiteSummary.js +24 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Sites.js +25 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Tasks.js +107 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.WorkloadSummary.js +20 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats._StructBase.js +37 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/import.js +29 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.ActiveRequestModel.js +9 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestLogDetailModel.js +17 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestLogModel.js +14 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestModel.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestSearchModel.js +8 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.ActiveRequestModel.js +9 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.ReqMgrRequestModel.js +8 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestLogDetailModel.js +18 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestLogModel.js +14 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestSearchModel.js +8 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.AgentModel.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.AlertModel.js +6 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.HistoryModel.js +14 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.JobDetailModel.js +22 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.JobSummaryModel.js +18 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.WorkloadSummaryModel.js +8 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._AjaxModelBase.js +55 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._ModelBase.js +77 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._RequestModelBase.js +127 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/import.js +26 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/WMStats.ViewModel.js +511 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/import.js +2 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T0/WMStats.Controls.js +117 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T1/WMStats.Controls.js +158 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/WMStats.CommonControls.js +100 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/import.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Graphs/WMStats.SiteHistoryGraph.js +8 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Graphs/import.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.CategoryDetailList.js +38 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestAlertGUI.js +128 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestDataList.js +25 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestDetailList.js +68 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestSummaryList.js +31 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.CategoryDetailList.js +54 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestAlertGUI.js +81 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestDataList.js +26 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestDetailList.js +122 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestSummaryList.js +35 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.ResubmissionList.js +64 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.AgentDetailList.js +137 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.CategoryTitle.js +20 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.HTMLList.js +12 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.JobDetailList.js +178 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.RequestLogList.js +88 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.RequestTitle.js +33 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/import.js +25 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.ActiveRequestTable.js +142 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.RunSummaryTable.js +77 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.TaskSummaryTable.js +127 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/addCategoryMap.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.ActiveRequestTable.js +132 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.ActiveRequestTableWithJob.js +164 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.AgentRequestSummaryTable.js +78 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.CMSSWSummaryTable.js +76 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.CampaignSummaryTable.js +76 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.SiteSummaryTable.js +63 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.TaskSummaryTable.js +124 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/addCategoryMap.js +17 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.JobSummaryTable.js +71 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.Table.js +70 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.TableController.js +130 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.WorkloadSummaryTable.js +62 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/import.js +26 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/WMStats.CategoryMap.js +45 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/WMStats.View.IndexHTML.js +137 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/import.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Ajax.js +74 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Couch.js +83 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Globals.js +200 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Utils.js +283 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/import-all.min.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/loader.js +27 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/global.min.js +639 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/import-all-t0.min.js +4317 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/import-all-t1.min.js +4972 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/lib/jquery.dataTables.columnFilter.js +732 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/lib/namespace.js +23 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/filters/deleteFatDocFilter.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/filters/filterDeletedDocs.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/filters/repfilter.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/rewrites.json +110 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/shows/redirect.js +23 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/agentInfo.js +17 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/generalFields.js +11 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/insertRequest.js +13 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/jobLogArchiveLocation.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/jobStateTransition.js +17 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/jobSummaryState.js +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/totalStats.js +39 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/validate_doc_update.js +10 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/cms_logo.jpg +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/details_closed.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/details_open.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/feed-icon.png +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/gradientfromtop.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/loading-small.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/loading.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/shadow.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/index.html +67 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/ajax_utils.js +104 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/config.js +10 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/md5.js +184 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/prototype.js +7510 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/requestsview.js +189 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/task_splitting.js +190 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/utils.js +337 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/admin.tmpl +217 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/apis.tmpl +36 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/approve.tmpl +112 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/assign.tmpl +252 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/batch.tmpl +72 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/batches.tmpl +63 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/confirm.tmpl +34 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/create.tmpl +112 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/doc.tmpl +152 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/error.tmpl +6 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/filter_sort.tmpl +55 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/generic.tmpl +6 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/index.tmpl +24 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/main.tmpl +33 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/manualConversions.txt +57 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/menu.tmpl +16 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/requests.tmpl +51 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/search.tmpl +22 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/validate.tmpl +9 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/workflow.tmpl +34 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/style/kube.min.css +1 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/style/main.css +194 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/style/style.css +249 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/admin.tmpl +217 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/apis.tmpl +36 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/approve.tmpl +114 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/assign.tmpl +253 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/batch.tmpl +72 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/batches.tmpl +63 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/confirm.tmpl +35 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/create.tmpl +112 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/doc.tmpl +153 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/error.tmpl +6 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/filter_sort.tmpl +55 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/generic.tmpl +6 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/index.tmpl +24 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/DataProcessing.tmpl +34 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/MonteCarlo.tmpl +29 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/ReDigi.tmpl +41 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/ReReco.tmpl +38 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/Resubmission.tmpl +22 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/StoreResults.tmpl +24 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/main.tmpl +33 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/menu.tmpl +16 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/requests.tmpl +51 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/search.tmpl +22 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/validate.tmpl +9 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/workflow.tmpl +34 -0
- reqmgr2-2.3.10.dist-info/LICENSE +202 -0
- reqmgr2-2.3.10.dist-info/METADATA +24 -0
- reqmgr2-2.3.10.dist-info/NOTICE +16 -0
- reqmgr2-2.3.10.dist-info/RECORD +678 -0
- reqmgr2-2.3.10.dist-info/WHEEL +5 -0
- reqmgr2-2.3.10.dist-info/top_level.txt +3 -0
|
@@ -0,0 +1,1412 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""
|
|
3
|
+
_StdBase_
|
|
4
|
+
|
|
5
|
+
Base class with helper functions for standard WMSpec files.
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import division
|
|
8
|
+
from future.utils import viewitems
|
|
9
|
+
from builtins import range, object
|
|
10
|
+
|
|
11
|
+
import logging
|
|
12
|
+
import json
|
|
13
|
+
|
|
14
|
+
from Utils.PythonVersion import PY3
|
|
15
|
+
from Utils.Utilities import decodeBytesToUnicodeConditional
|
|
16
|
+
from Utils.Utilities import makeList, makeNonEmptyList, strToBool, safeStr
|
|
17
|
+
from WMCore.WMRuntime.Tools.Scram import isCMSSWSupported
|
|
18
|
+
from WMCore.Cache.WMConfigCache import ConfigCache, ConfigCacheException
|
|
19
|
+
from WMCore.Lexicon import (couchurl, procstring, activity, procversion, primdataset,
|
|
20
|
+
gpuParameters, lfnBase, identifier, acqname, cmsname,
|
|
21
|
+
dataset, block, campaign, subRequestType)
|
|
22
|
+
from WMCore.ReqMgr.DataStructs.RequestStatus import REQUEST_START_STATE
|
|
23
|
+
from WMCore.ReqMgr.Tools.cms import releases, architectures
|
|
24
|
+
from WMCore.Services.Rucio.RucioUtils import RUCIO_RULES_PRIORITY
|
|
25
|
+
from WMCore.WMSpec.WMSpecErrors import WMSpecFactoryException
|
|
26
|
+
from WMCore.WMSpec.WMWorkload import newWorkload
|
|
27
|
+
from WMCore.WMSpec.WMWorkloadTools import (makeLumiList, checkDBSURL, validateArgumentsCreate)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class StdBase(object):
|
|
31
|
+
"""
|
|
32
|
+
_StdBase_
|
|
33
|
+
|
|
34
|
+
Base class with helper functions for standard WMSpec file.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self):
|
|
38
|
+
"""
|
|
39
|
+
__init__
|
|
40
|
+
|
|
41
|
+
Setup parameters that will be used by all workflows. These parameters
|
|
42
|
+
are not required to be set when the workflow is first created but will
|
|
43
|
+
need to be set before the sandbox is created and jobs are made.
|
|
44
|
+
These parameters in the init are set all to None, then they wil
|
|
45
|
+
be overwritten in the call.
|
|
46
|
+
|
|
47
|
+
These parameters can be changed after the workflow has been created by
|
|
48
|
+
the methods in the WMWorkloadHelper class.
|
|
49
|
+
"""
|
|
50
|
+
argumentDefinition = self.getWorkloadCreateArgs()
|
|
51
|
+
for arg in argumentDefinition:
|
|
52
|
+
setattr(self, argumentDefinition[arg]["attr"], None)
|
|
53
|
+
|
|
54
|
+
# Internal parameters
|
|
55
|
+
self.workloadName = None
|
|
56
|
+
self.config_cache = {}
|
|
57
|
+
|
|
58
|
+
return
|
|
59
|
+
|
|
60
|
+
def __call__(self, workloadName, arguments):
|
|
61
|
+
"""
|
|
62
|
+
__call__
|
|
63
|
+
|
|
64
|
+
Look through the arguments that were passed into the workload's call
|
|
65
|
+
method and pull out any that are setup by this base class.
|
|
66
|
+
"""
|
|
67
|
+
self.workloadName = workloadName
|
|
68
|
+
argumentDefinition = self.getWorkloadCreateArgs()
|
|
69
|
+
for arg in argumentDefinition:
|
|
70
|
+
try:
|
|
71
|
+
if arg in arguments:
|
|
72
|
+
if arguments[arg] is None:
|
|
73
|
+
setattr(self, argumentDefinition[arg]["attr"], arguments[arg])
|
|
74
|
+
else:
|
|
75
|
+
value = arguments[arg]
|
|
76
|
+
setattr(self, argumentDefinition[arg]["attr"], value)
|
|
77
|
+
elif argumentDefinition[arg]["optional"]:
|
|
78
|
+
defaultValue = argumentDefinition[arg]["default"]
|
|
79
|
+
setattr(self, argumentDefinition[arg]["attr"], defaultValue)
|
|
80
|
+
except Exception as ex:
|
|
81
|
+
raise WMSpecFactoryException("parameter %s: %s" % (arg, str(ex)))
|
|
82
|
+
|
|
83
|
+
# TODO: this replace can be removed in one year from now, thus March 2022
|
|
84
|
+
if hasattr(self, "dbsUrl"):
|
|
85
|
+
self.dbsUrl = self.dbsUrl.replace("cmsweb.cern.ch", "cmsweb-prod.cern.ch")
|
|
86
|
+
self.dbsUrl = self.dbsUrl.rstrip("/")
|
|
87
|
+
|
|
88
|
+
return
|
|
89
|
+
|
|
90
|
+
# static copy of the skim mapping
|
|
91
|
+
skimMap = {}
|
|
92
|
+
|
|
93
|
+
@staticmethod
|
|
94
|
+
def calcEvtsPerJobLumi(ePerJob, ePerLumi, tPerEvent, requestedEvents=None):
|
|
95
|
+
"""
|
|
96
|
+
_calcEvtsPerJobLumi_
|
|
97
|
+
|
|
98
|
+
Given RequestNumEvents (for MC from scratch), EventsPerJob,
|
|
99
|
+
EventsPerLumi and TimePerEvent information, calculates the final
|
|
100
|
+
values for EventsPerJob and EventsPerLumi.
|
|
101
|
+
|
|
102
|
+
Final result will always be an EventsPerJob multiple of EventsPerLumi,
|
|
103
|
+
no matter whether EventsPerJob was provided or not. In addition to that,
|
|
104
|
+
makes sure EventsPerJob is not greater than RequestNumEvents.
|
|
105
|
+
:param ePerJob: events per job
|
|
106
|
+
:param ePerLumi: events per lumi
|
|
107
|
+
:param tPerEvent: time per event
|
|
108
|
+
"""
|
|
109
|
+
# if not set, let's calculate an 8h job and set it for you
|
|
110
|
+
if ePerJob is None:
|
|
111
|
+
ePerJob = int((8.0 * 3600.0) / tPerEvent)
|
|
112
|
+
if requestedEvents and ePerJob > requestedEvents:
|
|
113
|
+
ePerJob = requestedEvents
|
|
114
|
+
|
|
115
|
+
if ePerLumi is None:
|
|
116
|
+
ePerLumi = ePerJob
|
|
117
|
+
elif ePerLumi > ePerJob:
|
|
118
|
+
ePerLumi = ePerJob
|
|
119
|
+
else:
|
|
120
|
+
# then make EventsPerJob multiple of EventsPerLumi and still closer to 8h jobs
|
|
121
|
+
multiplier = int(round(ePerJob / ePerLumi))
|
|
122
|
+
# make sure not to have 0 EventsPerJob
|
|
123
|
+
multiplier = max(multiplier, 1)
|
|
124
|
+
ePerJob = ePerLumi * multiplier
|
|
125
|
+
|
|
126
|
+
return ePerJob, ePerLumi
|
|
127
|
+
|
|
128
|
+
@staticmethod
|
|
129
|
+
def skimToDataTier(cmsswVersion, skim):
|
|
130
|
+
"""
|
|
131
|
+
Start subprocess and call CMSSW python code to retrieve data tier for given skim
|
|
132
|
+
|
|
133
|
+
Detects a usable scram arch for this CMSSW release on this machine
|
|
134
|
+
|
|
135
|
+
Cache the results and use cache for lookup if possible
|
|
136
|
+
|
|
137
|
+
"""
|
|
138
|
+
if not cmsswVersion:
|
|
139
|
+
return None
|
|
140
|
+
|
|
141
|
+
if cmsswVersion in StdBase.skimMap:
|
|
142
|
+
if skim in StdBase.skimMap[cmsswVersion]:
|
|
143
|
+
return StdBase.skimMap[cmsswVersion][skim]
|
|
144
|
+
else:
|
|
145
|
+
StdBase.skimMap[cmsswVersion] = {}
|
|
146
|
+
|
|
147
|
+
import glob
|
|
148
|
+
import subprocess
|
|
149
|
+
|
|
150
|
+
p = subprocess.Popen("/cvmfs/cms.cern.ch/common/cmsos", stdout=subprocess.PIPE, shell=True)
|
|
151
|
+
cmsos = p.communicate()[0]
|
|
152
|
+
cmsos = decodeBytesToUnicodeConditional(cmsos, condition=PY3).strip()
|
|
153
|
+
|
|
154
|
+
scramBaseDirs = glob.glob("/cvmfs/cms.cern.ch/%s*/cms/cmssw/%s" % (cmsos, cmsswVersion))
|
|
155
|
+
if not scramBaseDirs:
|
|
156
|
+
scramBaseDirs = glob.glob("/cvmfs/cms.cern.ch/%s*/cms/cmssw-patch/%s" % (cmsos, cmsswVersion))
|
|
157
|
+
if not scramBaseDirs:
|
|
158
|
+
return None
|
|
159
|
+
|
|
160
|
+
command = "source /cvmfs/cms.cern.ch/cmsset_default.sh\n"
|
|
161
|
+
command += "cd %s\n" % scramBaseDirs[0]
|
|
162
|
+
command += "eval `scramv1 runtime -sh`\n"
|
|
163
|
+
|
|
164
|
+
if isCMSSWSupported(cmsswVersion, "CMSSW_10_3_0"):
|
|
165
|
+
command += """python3 -c 'from Configuration.StandardSequences.Skims_cff import getSkimDataTier\n"""
|
|
166
|
+
else:
|
|
167
|
+
command += """python -c 'from Configuration.StandardSequences.Skims_cff import getSkimDataTier\n"""
|
|
168
|
+
|
|
169
|
+
command += """dataTier = getSkimDataTier("%s")\n""" % skim
|
|
170
|
+
command += """if dataTier:\n\tprint(dataTier.value())'"""
|
|
171
|
+
|
|
172
|
+
p = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
|
|
173
|
+
dataTier = p.communicate()[0]
|
|
174
|
+
dataTier = decodeBytesToUnicodeConditional(dataTier, condition=PY3).strip()
|
|
175
|
+
|
|
176
|
+
if dataTier == "None":
|
|
177
|
+
dataTier = None
|
|
178
|
+
|
|
179
|
+
StdBase.skimMap[cmsswVersion][skim] = dataTier
|
|
180
|
+
|
|
181
|
+
return dataTier
|
|
182
|
+
|
|
183
|
+
def loadCouchID(self, configDoc=None, configCacheUrl=None, couchDBName=None):
|
|
184
|
+
"""
|
|
185
|
+
Load a config document from couch db and return the object
|
|
186
|
+
:param configDoc: the config ID document
|
|
187
|
+
:param configCacheUrl: couch url for the config
|
|
188
|
+
:param couchDBName: couch database name
|
|
189
|
+
:return: config document object
|
|
190
|
+
"""
|
|
191
|
+
# TODO: Evaluate if we should call validateConfigCacheExists here
|
|
192
|
+
configCache = None
|
|
193
|
+
if configDoc is not None and configDoc != "":
|
|
194
|
+
if (configCacheUrl, couchDBName) in self.config_cache:
|
|
195
|
+
configCache = self.config_cache[(configCacheUrl, couchDBName)]
|
|
196
|
+
else:
|
|
197
|
+
configCache = ConfigCache(configCacheUrl, couchDBName, True)
|
|
198
|
+
self.config_cache[(configCacheUrl, couchDBName)] = configCache
|
|
199
|
+
|
|
200
|
+
configCache.loadByID(configDoc)
|
|
201
|
+
|
|
202
|
+
return configCache
|
|
203
|
+
|
|
204
|
+
def determineOutputModules(self, scenarioFunc=None, scenarioArgs=None,
|
|
205
|
+
configCache=None, cmsswVersion=None):
|
|
206
|
+
"""
|
|
207
|
+
_determineOutputModules_
|
|
208
|
+
|
|
209
|
+
Determine the output module names and associated metadata for the
|
|
210
|
+
given config.
|
|
211
|
+
"""
|
|
212
|
+
# set default scenarioArgs to empty dictionary if it is None.
|
|
213
|
+
scenarioArgs = scenarioArgs or {}
|
|
214
|
+
outputModules = {}
|
|
215
|
+
if configCache is not None:
|
|
216
|
+
outputModules = configCache.getOutputModuleInfo()
|
|
217
|
+
else:
|
|
218
|
+
if 'outputs' in scenarioArgs and scenarioFunc in ["promptReco", "expressProcessing", "repack"]:
|
|
219
|
+
|
|
220
|
+
for output in scenarioArgs.get('outputs', []):
|
|
221
|
+
|
|
222
|
+
moduleLabel = output['moduleLabel']
|
|
223
|
+
outputModules[moduleLabel] = {'dataTier': output['dataTier']}
|
|
224
|
+
if 'primaryDataset' in output:
|
|
225
|
+
outputModules[moduleLabel]['primaryDataset'] = output['primaryDataset']
|
|
226
|
+
if 'rawSkim' in output:
|
|
227
|
+
outputModules[moduleLabel]['rawSkim'] = output['rawSkim']
|
|
228
|
+
if 'filterName' in output:
|
|
229
|
+
outputModules[moduleLabel]['filterName'] = output['filterName']
|
|
230
|
+
|
|
231
|
+
for physicsSkim in scenarioArgs.get('PhysicsSkims', []):
|
|
232
|
+
dataTier = StdBase.skimToDataTier(cmsswVersion, physicsSkim)
|
|
233
|
+
if dataTier:
|
|
234
|
+
moduleLabel = "SKIMStream%s" % physicsSkim
|
|
235
|
+
outputModules[moduleLabel] = {'dataTier': dataTier,
|
|
236
|
+
'filterName': physicsSkim}
|
|
237
|
+
else:
|
|
238
|
+
self.raiseValidationException("Can't find physics skim %s in %s" % (physicsSkim, cmsswVersion))
|
|
239
|
+
|
|
240
|
+
elif scenarioFunc == "alcaSkim":
|
|
241
|
+
|
|
242
|
+
for alcaSkim in scenarioArgs.get('skims', []):
|
|
243
|
+
moduleLabel = "ALCARECOStream%s" % alcaSkim
|
|
244
|
+
if alcaSkim.startswith("PromptCalibProd"):
|
|
245
|
+
dataTier = "ALCAPROMPT"
|
|
246
|
+
else:
|
|
247
|
+
dataTier = "ALCARECO"
|
|
248
|
+
outputModules[moduleLabel] = {'dataTier': dataTier,
|
|
249
|
+
'primaryDataset': scenarioArgs.get('primaryDataset'),
|
|
250
|
+
'filterName': alcaSkim}
|
|
251
|
+
|
|
252
|
+
return outputModules
|
|
253
|
+
|
|
254
|
+
def addRuntimeMonitors(self, task):
|
|
255
|
+
"""
|
|
256
|
+
_addRuntimeMonitors_
|
|
257
|
+
|
|
258
|
+
Add dashboard monitoring for the given task.
|
|
259
|
+
Memory settings are defined in Megabytes and timing in seconds.
|
|
260
|
+
"""
|
|
261
|
+
# Default settings defined by CMS policy
|
|
262
|
+
maxpss = 2.3 * 1024 # 2.3 GiB, but in MiB
|
|
263
|
+
softTimeout = 47 * 3600 # 47h
|
|
264
|
+
hardTimeout = 47 * 3600 + 5 * 60 # 47h + 5 minutes
|
|
265
|
+
|
|
266
|
+
monitoring = task.data.section_("watchdog")
|
|
267
|
+
monitoring.interval = 300
|
|
268
|
+
monitoring.monitors = ["PerformanceMonitor"]
|
|
269
|
+
monitoring.section_("PerformanceMonitor")
|
|
270
|
+
monitoring.PerformanceMonitor.maxPSS = maxpss
|
|
271
|
+
monitoring.PerformanceMonitor.softTimeout = softTimeout
|
|
272
|
+
monitoring.PerformanceMonitor.hardTimeout = hardTimeout
|
|
273
|
+
return task
|
|
274
|
+
|
|
275
|
+
def createWorkload(self):
|
|
276
|
+
"""
|
|
277
|
+
_createWorkload_
|
|
278
|
+
|
|
279
|
+
Create a new workload.
|
|
280
|
+
"""
|
|
281
|
+
ownerProps = {'dn': self.owner_dn, 'vogroup': self.owner_vogroup, 'vorole': self.owner_vorole}
|
|
282
|
+
|
|
283
|
+
workload = newWorkload(self.workloadName)
|
|
284
|
+
workload.setOwnerDetails(self.owner, self.group, ownerProps)
|
|
285
|
+
workload.setStartPolicy("DatasetBlock", SliceType="NumberOfFiles", SliceSize=1)
|
|
286
|
+
workload.setEndPolicy("SingleShot")
|
|
287
|
+
workload.setAcquisitionEra(acquisitionEras=self.acquisitionEra)
|
|
288
|
+
workload.setProcessingVersion(processingVersions=self.processingVersion)
|
|
289
|
+
workload.setProcessingString(processingStrings=self.processingString)
|
|
290
|
+
workload.setValidStatus(validStatus=self.validStatus)
|
|
291
|
+
workload.setLumiList(lumiLists=self.lumiList)
|
|
292
|
+
workload.setPriority(self.priority)
|
|
293
|
+
workload.setCampaign(self.campaign)
|
|
294
|
+
workload.setRequestType(self.requestType)
|
|
295
|
+
workload.setDbsUrl(self.dbsUrl)
|
|
296
|
+
workload.setPrepID(self.prepID)
|
|
297
|
+
return workload
|
|
298
|
+
|
|
299
|
+
def setupProcessingTask(self, procTask, taskType, inputDataset=None, inputStep=None,
|
|
300
|
+
inputModule=None, scenarioName=None,
|
|
301
|
+
scenarioFunc=None, scenarioArgs=None,
|
|
302
|
+
couchDBName=None, configDoc=None, splitAlgo="LumiBased",
|
|
303
|
+
splitArgs=None, seeding=None,
|
|
304
|
+
totalEvents=None, eventsPerLumi=None,
|
|
305
|
+
userDN=None, asyncDest=None, owner_vogroup="DEFAULT",
|
|
306
|
+
owner_vorole="DEFAULT", stepType="CMSSW",
|
|
307
|
+
userSandbox=None, userFiles=None, primarySubType=None,
|
|
308
|
+
forceMerged=False, forceUnmerged=False,
|
|
309
|
+
configCacheUrl=None, timePerEvent=None, memoryReq=None,
|
|
310
|
+
sizePerEvent=None, applySiteLists=True, cmsswVersion=None,
|
|
311
|
+
scramArch=None, globalTag=None, taskConf=None):
|
|
312
|
+
"""
|
|
313
|
+
_setupProcessingTask_
|
|
314
|
+
|
|
315
|
+
Given an empty task add cmsRun, stagOut and logArch steps. Configure
|
|
316
|
+
the input depending on the method parameters:
|
|
317
|
+
inputDataset not empty: This is a top level processing task where the
|
|
318
|
+
input will be fed in by DBS. Setup the whitelists and blacklists.
|
|
319
|
+
inputDataset empty: This processing task will be fed from the output
|
|
320
|
+
of another task. The inputStep and name of the output module from
|
|
321
|
+
that step (inputModule) must be specified.
|
|
322
|
+
|
|
323
|
+
Processing config will be setup as follows:
|
|
324
|
+
configDoc not empty - Use a ConfigCache config, configCacheUrl and
|
|
325
|
+
couchDBName must not be empty.
|
|
326
|
+
configDoc empty - Use a Configuration.DataProcessing config. The
|
|
327
|
+
scenarioName, scenarioFunc and scenarioArgs parameters must not be
|
|
328
|
+
empty.
|
|
329
|
+
|
|
330
|
+
The seeding and totalEvents parameters are only used for production jobs.
|
|
331
|
+
|
|
332
|
+
taskConf is a dictionary with either Task or Step level key/value pairs used to
|
|
333
|
+
bypass the workload level argument, providing flexibility to have different
|
|
334
|
+
settings even inside the same task object.
|
|
335
|
+
"""
|
|
336
|
+
# set default values in case it's not passed to this method
|
|
337
|
+
scenarioArgs = scenarioArgs or {}
|
|
338
|
+
taskConf = taskConf or {}
|
|
339
|
+
splitArgs = splitArgs or {'lumis_per_job': 8}
|
|
340
|
+
userFiles = userFiles or []
|
|
341
|
+
|
|
342
|
+
self.addRuntimeMonitors(procTask)
|
|
343
|
+
procTaskCmssw = procTask.makeStep("cmsRun1")
|
|
344
|
+
procTaskCmssw.setStepType(stepType)
|
|
345
|
+
procTaskStageOut = procTaskCmssw.addStep("stageOut1")
|
|
346
|
+
procTaskStageOut.setStepType("StageOut")
|
|
347
|
+
procTaskStageOut.setUserDN(userDN)
|
|
348
|
+
procTaskStageOut.setAsyncDest(asyncDest)
|
|
349
|
+
procTaskStageOut.setUserRoleAndGroup(owner_vogroup, owner_vorole)
|
|
350
|
+
procTaskStageOut.setNewStageoutOverride(self.enableNewStageout)
|
|
351
|
+
procTaskLogArch = procTaskCmssw.addStep("logArch1")
|
|
352
|
+
procTaskLogArch.setStepType("LogArchive")
|
|
353
|
+
procTaskLogArch.setNewStageoutOverride(self.enableNewStageout)
|
|
354
|
+
|
|
355
|
+
procTask.applyTemplates()
|
|
356
|
+
|
|
357
|
+
procTask.setTaskLogBaseLFN(self.unmergedLFNBase)
|
|
358
|
+
|
|
359
|
+
newSplitArgs = {}
|
|
360
|
+
for argName in splitArgs:
|
|
361
|
+
newSplitArgs[str(argName)] = splitArgs[argName]
|
|
362
|
+
|
|
363
|
+
procTask.setSplittingAlgorithm(splitAlgo, **newSplitArgs)
|
|
364
|
+
|
|
365
|
+
if not timePerEvent and self.timePerEvent:
|
|
366
|
+
timePerEvent = self.timePerEvent
|
|
367
|
+
if not sizePerEvent and self.sizePerEvent:
|
|
368
|
+
sizePerEvent = self.sizePerEvent
|
|
369
|
+
if not memoryReq and self.memory:
|
|
370
|
+
memoryReq = self.memory
|
|
371
|
+
if not cmsswVersion and self.frameworkVersion:
|
|
372
|
+
cmsswVersion = self.frameworkVersion
|
|
373
|
+
if not scramArch and self.scramArch:
|
|
374
|
+
scramArch = self.scramArch
|
|
375
|
+
if not globalTag and self.globalTag:
|
|
376
|
+
globalTag = self.globalTag
|
|
377
|
+
|
|
378
|
+
procTask.setJobResourceInformation(timePerEvent=timePerEvent,
|
|
379
|
+
sizePerEvent=sizePerEvent,
|
|
380
|
+
memoryReq=memoryReq)
|
|
381
|
+
|
|
382
|
+
procTask.setTaskType(taskType)
|
|
383
|
+
|
|
384
|
+
# we better be safe in case the specs set these Task/Step level args to None
|
|
385
|
+
acqEra = taskConf.get("AcquisitionEra") or self.acquisitionEra
|
|
386
|
+
procStr = taskConf.get("ProcessingString") or self.processingString
|
|
387
|
+
procVer = taskConf.get("ProcessingVersion") or self.processingVersion
|
|
388
|
+
prepID = taskConf.get("PrepID") or self.prepID
|
|
389
|
+
campaignName = taskConf.get("Campaign") or self.campaign
|
|
390
|
+
procTask.setAcquisitionEra(acqEra)
|
|
391
|
+
procTask.setProcessingString(procStr)
|
|
392
|
+
procTask.setProcessingVersion(procVer)
|
|
393
|
+
procTask.setCampaignName(campaignName)
|
|
394
|
+
|
|
395
|
+
if taskType in ["Production", 'PrivateMC'] and totalEvents is not None:
|
|
396
|
+
procTask.addGenerator(seeding)
|
|
397
|
+
procTask.addProduction(totalEvents=totalEvents)
|
|
398
|
+
procTask.setFirstEventAndLumi(firstEvent=self.firstEvent,
|
|
399
|
+
firstLumi=self.firstLumi)
|
|
400
|
+
else:
|
|
401
|
+
if inputDataset is not None:
|
|
402
|
+
(primary, processed, tier) = self.inputDataset[1:].split("/")
|
|
403
|
+
procTask.addInputDataset(name=self.inputDataset, primary=primary,
|
|
404
|
+
processed=processed, tier=tier, dbsurl=self.dbsUrl,
|
|
405
|
+
block_blacklist=self.blockBlacklist,
|
|
406
|
+
block_whitelist=self.blockWhitelist,
|
|
407
|
+
run_blacklist=self.runBlacklist,
|
|
408
|
+
run_whitelist=self.runWhitelist)
|
|
409
|
+
elif inputStep is not None and inputModule is not None:
|
|
410
|
+
procTask.setInputReference(inputStep, outputModule=inputModule)
|
|
411
|
+
|
|
412
|
+
if primarySubType:
|
|
413
|
+
procTask.setPrimarySubType(subType=primarySubType)
|
|
414
|
+
|
|
415
|
+
procTaskCmsswHelper = procTaskCmssw.getTypeHelper()
|
|
416
|
+
procTaskStageHelper = procTaskStageOut.getTypeHelper()
|
|
417
|
+
|
|
418
|
+
# StepChain overrides
|
|
419
|
+
multicore = self.multicore
|
|
420
|
+
eventStreams = self.eventStreams
|
|
421
|
+
if 'Multicore' in taskConf and taskConf['Multicore'] > 0:
|
|
422
|
+
multicore = taskConf['Multicore']
|
|
423
|
+
if taskConf.get("EventStreams") is not None and taskConf['EventStreams'] >= 0:
|
|
424
|
+
eventStreams = taskConf['EventStreams']
|
|
425
|
+
procTaskCmsswHelper.setNumberOfCores(multicore, eventStreams)
|
|
426
|
+
|
|
427
|
+
gpuRequired = self.requiresGPU
|
|
428
|
+
if taskConf.get('RequiresGPU', None):
|
|
429
|
+
gpuRequired = taskConf['RequiresGPU']
|
|
430
|
+
# Note that GPUParams has already been validated
|
|
431
|
+
if "GPUParams" in taskConf and json.loads(taskConf['GPUParams']):
|
|
432
|
+
gpuParams = json.loads(taskConf['GPUParams'])
|
|
433
|
+
else:
|
|
434
|
+
gpuParams = json.loads(self.gPUParams)
|
|
435
|
+
procTaskCmsswHelper.setGPUSettings(gpuRequired, gpuParams)
|
|
436
|
+
|
|
437
|
+
procTaskCmsswHelper.setUserSandbox(userSandbox)
|
|
438
|
+
procTaskCmsswHelper.setUserFiles(userFiles)
|
|
439
|
+
procTaskCmsswHelper.setGlobalTag(globalTag)
|
|
440
|
+
procTaskCmsswHelper.setPrepId(prepID)
|
|
441
|
+
procTaskCmsswHelper.setOverrideCatalog(self.overrideCatalog)
|
|
442
|
+
procTaskCmsswHelper.setErrorDestinationStep(stepName=procTaskLogArch.name())
|
|
443
|
+
|
|
444
|
+
if forceMerged:
|
|
445
|
+
procTaskStageHelper.setMinMergeSize(0, 0)
|
|
446
|
+
elif forceUnmerged and not isinstance(forceUnmerged, list):
|
|
447
|
+
procTaskStageHelper.disableStraightToMerge()
|
|
448
|
+
else:
|
|
449
|
+
procTaskStageHelper.setMinMergeSize(self.minMergeSize, self.maxMergeEvents)
|
|
450
|
+
if forceUnmerged and isinstance(forceUnmerged, list):
|
|
451
|
+
procTaskStageHelper.disableStraightToMergeForOutputModules(forceUnmerged)
|
|
452
|
+
|
|
453
|
+
procTaskCmsswHelper.cmsswSetup(cmsswVersion,
|
|
454
|
+
softwareEnvironment="",
|
|
455
|
+
scramArch=scramArch)
|
|
456
|
+
|
|
457
|
+
if "events_per_lumi" in newSplitArgs:
|
|
458
|
+
eventsPerLumi = newSplitArgs["events_per_lumi"]
|
|
459
|
+
procTaskCmsswHelper.setEventsPerLumi(eventsPerLumi)
|
|
460
|
+
configCache = self.loadCouchID(configDoc, configCacheUrl, couchDBName)
|
|
461
|
+
procTaskCmsswHelper.setPhysicsType(configCache)
|
|
462
|
+
configOutput = self.determineOutputModules(scenarioFunc, scenarioArgs,
|
|
463
|
+
configCache, cmsswVersion)
|
|
464
|
+
outputModules = {}
|
|
465
|
+
for outputModuleName in configOutput:
|
|
466
|
+
outputModule = self.addOutputModule(procTask,
|
|
467
|
+
outputModuleName,
|
|
468
|
+
configOutput[outputModuleName].get('primaryDataset',
|
|
469
|
+
self.inputPrimaryDataset),
|
|
470
|
+
configOutput[outputModuleName]['dataTier'],
|
|
471
|
+
configOutput[outputModuleName].get('filterName', None),
|
|
472
|
+
configOutput[outputModuleName].get('rawSkim', None),
|
|
473
|
+
forceMerged=forceMerged, forceUnmerged=forceUnmerged, taskConf=taskConf)
|
|
474
|
+
outputModules[outputModuleName] = outputModule
|
|
475
|
+
|
|
476
|
+
if configDoc is not None and configDoc != "":
|
|
477
|
+
procTaskCmsswHelper.setConfigCache(configCacheUrl, configDoc, couchDBName)
|
|
478
|
+
else:
|
|
479
|
+
# delete dataset information from scenarioArgs
|
|
480
|
+
if 'outputs' in scenarioArgs:
|
|
481
|
+
for output in scenarioArgs['outputs']:
|
|
482
|
+
if 'primaryDataset' in output:
|
|
483
|
+
del output['primaryDataset']
|
|
484
|
+
if 'primaryDataset' in scenarioArgs:
|
|
485
|
+
del scenarioArgs['primaryDataset']
|
|
486
|
+
|
|
487
|
+
procTaskCmsswHelper.setDataProcessingConfig(scenarioName, scenarioFunc,
|
|
488
|
+
**scenarioArgs)
|
|
489
|
+
# only in the very end, in order to get it in for the children tasks as well
|
|
490
|
+
procTask.setPrepID(prepID)
|
|
491
|
+
|
|
492
|
+
# has to be done in the very end such that child tasks are set too
|
|
493
|
+
procTask.setPerformanceMonitor(softTimeout=taskConf.get("SoftTimeout", None),
|
|
494
|
+
gracePeriod=taskConf.get("GracePeriod", None))
|
|
495
|
+
|
|
496
|
+
# Set procTask physics task type
|
|
497
|
+
procTask.setPhysicsTaskType()
|
|
498
|
+
|
|
499
|
+
return outputModules
|
|
500
|
+
|
|
501
|
+
def _getDictionaryParams(self, prop, key, default=None):
|
|
502
|
+
"""
|
|
503
|
+
Support dictonary format for property definition.
|
|
504
|
+
acquisitionEra, processingString, processingVersion
|
|
505
|
+
"""
|
|
506
|
+
if isinstance(prop, dict):
|
|
507
|
+
return prop.get(key, default)
|
|
508
|
+
else:
|
|
509
|
+
return prop
|
|
510
|
+
|
|
511
|
+
def addOutputModule(self, parentTask, outputModuleName,
|
|
512
|
+
primaryDataset, dataTier, filterName,
|
|
513
|
+
rawSkim=None,
|
|
514
|
+
stepName="cmsRun1", forceMerged=False,
|
|
515
|
+
forceUnmerged=False, taskConf=None):
|
|
516
|
+
"""
|
|
517
|
+
_addOutputModule_
|
|
518
|
+
|
|
519
|
+
Add an output module to the given processing task.
|
|
520
|
+
|
|
521
|
+
taskConf is used for multi-step tasks where diff output processed
|
|
522
|
+
dataset name is desired
|
|
523
|
+
"""
|
|
524
|
+
taskConf = taskConf or {}
|
|
525
|
+
haveFilterName = (filterName is not None and filterName != "")
|
|
526
|
+
haveProcString = (self.processingString is not None and self.processingString != "")
|
|
527
|
+
haveRunNumber = (self.runNumber is not None and self.runNumber > 0)
|
|
528
|
+
|
|
529
|
+
taskName = parentTask.name()
|
|
530
|
+
if self.requestType == "StepChain" and "StepName" in taskConf:
|
|
531
|
+
taskName = taskConf["StepName"]
|
|
532
|
+
acqEra = taskConf.get('AcquisitionEra') or self._getDictionaryParams(self.acquisitionEra, taskName)
|
|
533
|
+
procString = taskConf.get('ProcessingString') or self._getDictionaryParams(self.processingString, taskName)
|
|
534
|
+
procVersion = taskConf.get('ProcessingVersion') or self._getDictionaryParams(self.processingVersion,
|
|
535
|
+
taskName, 1)
|
|
536
|
+
|
|
537
|
+
processedDataset = "%s-" % acqEra
|
|
538
|
+
if haveFilterName:
|
|
539
|
+
processedDataset += "%s-" % filterName
|
|
540
|
+
if haveProcString:
|
|
541
|
+
processedDataset += "%s-" % procString
|
|
542
|
+
processedDataset += "v%i" % procVersion
|
|
543
|
+
|
|
544
|
+
if haveProcString:
|
|
545
|
+
processingLFN = "%s-v%i" % (procString, procVersion)
|
|
546
|
+
else:
|
|
547
|
+
processingLFN = "v%i" % procVersion
|
|
548
|
+
|
|
549
|
+
if haveRunNumber:
|
|
550
|
+
stringRunNumber = str(self.runNumber).zfill(9)
|
|
551
|
+
runSections = [stringRunNumber[i:i + 3] for i in range(0, 9, 3)]
|
|
552
|
+
runLFN = "/".join(runSections)
|
|
553
|
+
|
|
554
|
+
unmergedLFN = "%s/%s/%s/%s" % (self.unmergedLFNBase,
|
|
555
|
+
acqEra,
|
|
556
|
+
primaryDataset, dataTier)
|
|
557
|
+
mergedLFN = "%s/%s/%s/%s" % (self.mergedLFNBase,
|
|
558
|
+
acqEra,
|
|
559
|
+
primaryDataset, dataTier)
|
|
560
|
+
|
|
561
|
+
if haveFilterName:
|
|
562
|
+
unmergedLFN += "/%s-%s" % (filterName, processingLFN)
|
|
563
|
+
mergedLFN += "/%s-%s" % (filterName, processingLFN)
|
|
564
|
+
else:
|
|
565
|
+
unmergedLFN += "/%s" % processingLFN
|
|
566
|
+
mergedLFN += "/%s" % processingLFN
|
|
567
|
+
|
|
568
|
+
if haveRunNumber:
|
|
569
|
+
unmergedLFN += "/%s" % runLFN
|
|
570
|
+
mergedLFN += "/%s" % runLFN
|
|
571
|
+
|
|
572
|
+
lfnBase(unmergedLFN)
|
|
573
|
+
lfnBase(mergedLFN)
|
|
574
|
+
|
|
575
|
+
isTransient = True
|
|
576
|
+
|
|
577
|
+
if forceMerged:
|
|
578
|
+
unmergedLFN = mergedLFN
|
|
579
|
+
isTransient = False
|
|
580
|
+
elif forceUnmerged:
|
|
581
|
+
mergedLFN = unmergedLFN
|
|
582
|
+
|
|
583
|
+
cmsswStep = parentTask.getStep(stepName)
|
|
584
|
+
cmsswStepHelper = cmsswStep.getTypeHelper()
|
|
585
|
+
cmsswStepHelper.addOutputModule(outputModuleName,
|
|
586
|
+
primaryDataset=primaryDataset,
|
|
587
|
+
processedDataset=processedDataset,
|
|
588
|
+
dataTier=dataTier,
|
|
589
|
+
filterName=filterName,
|
|
590
|
+
rawSkim=rawSkim,
|
|
591
|
+
lfnBase=unmergedLFN,
|
|
592
|
+
mergedLFNBase=mergedLFN,
|
|
593
|
+
transient=isTransient)
|
|
594
|
+
|
|
595
|
+
return {"primaryDataset": primaryDataset,
|
|
596
|
+
"dataTier": dataTier,
|
|
597
|
+
"processedDataset": processedDataset,
|
|
598
|
+
"filterName": filterName,
|
|
599
|
+
"rawSkim": rawSkim}
|
|
600
|
+
|
|
601
|
+
def addLogCollectTask(self, parentTask, taskName="LogCollect", filesPerJob=500,
|
|
602
|
+
cmsswVersion=None, scramArch=None):
|
|
603
|
+
"""
|
|
604
|
+
_addLogCollectTask_
|
|
605
|
+
|
|
606
|
+
Create a LogCollect task for log archives that are produced by the
|
|
607
|
+
parent task.
|
|
608
|
+
"""
|
|
609
|
+
cmsswVersion = cmsswVersion or self.frameworkVersion
|
|
610
|
+
scramArch = scramArch or self.scramArch
|
|
611
|
+
logCollectTask = parentTask.addTask(taskName)
|
|
612
|
+
self.addRuntimeMonitors(logCollectTask)
|
|
613
|
+
logCollectStep = logCollectTask.makeStep("logCollect1")
|
|
614
|
+
logCollectStep.setStepType("LogCollect")
|
|
615
|
+
logCollectStep.setNewStageoutOverride(self.enableNewStageout)
|
|
616
|
+
logCollectTask.applyTemplates()
|
|
617
|
+
logCollectTask.setSplittingAlgorithm("MinFileBased", files_per_job=filesPerJob)
|
|
618
|
+
logCollectTask.setTaskType("LogCollect")
|
|
619
|
+
|
|
620
|
+
parentTaskLogArch = parentTask.getStep("logArch1")
|
|
621
|
+
logCollectTask.setInputReference(parentTaskLogArch, outputModule="logArchive")
|
|
622
|
+
|
|
623
|
+
logCollectStepHelper = logCollectStep.getTypeHelper()
|
|
624
|
+
logCollectStepHelper.cmsswSetup(cmsswVersion,
|
|
625
|
+
softwareEnvironment="",
|
|
626
|
+
scramArch=scramArch)
|
|
627
|
+
|
|
628
|
+
return logCollectTask
|
|
629
|
+
|
|
630
|
+
def addMergeTask(self, parentTask, parentTaskSplitting, parentOutputModuleName, parentStepName="cmsRun1",
|
|
631
|
+
doLogCollect=True, lfn_counter=0, forceTaskName=None, cmsswVersion=None, scramArch=None,
|
|
632
|
+
taskConf=None):
|
|
633
|
+
"""
|
|
634
|
+
_addMergeTask_
|
|
635
|
+
|
|
636
|
+
Create a merge task for files produced by the parent task.
|
|
637
|
+
|
|
638
|
+
taskConf is used for multi-step Tasks where different merge settings are desired for
|
|
639
|
+
the same parent production/processing task
|
|
640
|
+
"""
|
|
641
|
+
cmsswVersion = cmsswVersion or self.frameworkVersion
|
|
642
|
+
scramArch = scramArch or self.scramArch
|
|
643
|
+
# StepChain use case, to avoid merge task names clashes
|
|
644
|
+
forceTaskName = forceTaskName or parentTask.name()
|
|
645
|
+
taskConf = taskConf or {}
|
|
646
|
+
|
|
647
|
+
mergeTask = parentTask.addTask("%sMerge%s" % (forceTaskName, parentOutputModuleName))
|
|
648
|
+
self.addRuntimeMonitors(mergeTask)
|
|
649
|
+
mergeTaskCmssw = mergeTask.makeStep("cmsRun1")
|
|
650
|
+
mergeTaskCmssw.setStepType("CMSSW")
|
|
651
|
+
|
|
652
|
+
mergeTaskStageOut = mergeTaskCmssw.addStep("stageOut1")
|
|
653
|
+
mergeTaskStageOut.setStepType("StageOut")
|
|
654
|
+
mergeTaskStageOut.setNewStageoutOverride(self.enableNewStageout)
|
|
655
|
+
|
|
656
|
+
mergeTaskLogArch = mergeTaskCmssw.addStep("logArch1")
|
|
657
|
+
mergeTaskLogArch.setStepType("LogArchive")
|
|
658
|
+
mergeTaskLogArch.setNewStageoutOverride(self.enableNewStageout)
|
|
659
|
+
|
|
660
|
+
mergeTask.setTaskLogBaseLFN(self.unmergedLFNBase)
|
|
661
|
+
# we better be safe in case the specs set these Task/Step level args to None
|
|
662
|
+
acqEra = taskConf.get("AcquisitionEra") or self.acquisitionEra
|
|
663
|
+
procStr = taskConf.get("ProcessingString") or self.processingString
|
|
664
|
+
procVer = taskConf.get("ProcessingVersion") or self.processingVersion
|
|
665
|
+
mergeTask.setAcquisitionEra(acqEra)
|
|
666
|
+
mergeTask.setProcessingString(procStr)
|
|
667
|
+
mergeTask.setProcessingVersion(procVer)
|
|
668
|
+
|
|
669
|
+
if doLogCollect:
|
|
670
|
+
taskNameLC = "%s%sMergeLogCollect" % (forceTaskName, parentOutputModuleName)
|
|
671
|
+
self.addLogCollectTask(mergeTask, taskName=taskNameLC,
|
|
672
|
+
cmsswVersion=cmsswVersion, scramArch=scramArch)
|
|
673
|
+
|
|
674
|
+
mergeTask.setTaskType("Merge")
|
|
675
|
+
mergeTask.applyTemplates()
|
|
676
|
+
|
|
677
|
+
if parentTaskSplitting == "EventBased" and parentTask.taskType() != "Production":
|
|
678
|
+
splitAlgo = "WMBSMergeBySize"
|
|
679
|
+
else:
|
|
680
|
+
splitAlgo = "ParentlessMergeBySize"
|
|
681
|
+
|
|
682
|
+
parentTaskCmssw = parentTask.getStep(parentStepName)
|
|
683
|
+
parentOutputModule = parentTaskCmssw.getOutputModule(parentOutputModuleName)
|
|
684
|
+
|
|
685
|
+
dataTier = getattr(parentOutputModule, "dataTier")
|
|
686
|
+
mergeTask.setInputReference(parentTaskCmssw, outputModule=parentOutputModuleName, dataTier=dataTier)
|
|
687
|
+
|
|
688
|
+
mergeTaskCmsswHelper = mergeTaskCmssw.getTypeHelper()
|
|
689
|
+
mergeTaskStageHelper = mergeTaskStageOut.getTypeHelper()
|
|
690
|
+
|
|
691
|
+
mergeTaskCmsswHelper.cmsswSetup(cmsswVersion,
|
|
692
|
+
softwareEnvironment="",
|
|
693
|
+
scramArch=scramArch)
|
|
694
|
+
|
|
695
|
+
mergeTaskCmsswHelper.setErrorDestinationStep(stepName=mergeTaskLogArch.name())
|
|
696
|
+
mergeTaskCmsswHelper.setGlobalTag(self.globalTag)
|
|
697
|
+
mergeTaskCmsswHelper.setOverrideCatalog(self.overrideCatalog)
|
|
698
|
+
|
|
699
|
+
if splitAlgo != "WMBSMergeBySize" and self.robustMerge:
|
|
700
|
+
mergeTaskCmsswHelper.setSkipBadFiles(True)
|
|
701
|
+
|
|
702
|
+
mergeTask.setSplittingAlgorithm(splitAlgo,
|
|
703
|
+
max_merge_size=self.maxMergeSize,
|
|
704
|
+
min_merge_size=self.minMergeSize,
|
|
705
|
+
max_merge_events=self.maxMergeEvents,
|
|
706
|
+
max_wait_time=self.maxWaitTime,
|
|
707
|
+
initial_lfn_counter=lfn_counter)
|
|
708
|
+
|
|
709
|
+
if dataTier == "DQMIO":
|
|
710
|
+
mergeTaskCmsswHelper.setDataProcessingConfig("do_not_use", "merge",
|
|
711
|
+
newDQMIO=True)
|
|
712
|
+
elif dataTier in ("NANOAOD", "NANOAODSIM"):
|
|
713
|
+
mergeTaskCmsswHelper.setDataProcessingConfig("do_not_use", "merge",
|
|
714
|
+
mergeNANO=True)
|
|
715
|
+
else:
|
|
716
|
+
mergeTaskCmsswHelper.setDataProcessingConfig("do_not_use", "merge")
|
|
717
|
+
|
|
718
|
+
mergeTaskStageHelper.setMinMergeSize(0, 0)
|
|
719
|
+
|
|
720
|
+
self.addOutputModule(mergeTask, "Merged",
|
|
721
|
+
primaryDataset=getattr(parentOutputModule, "primaryDataset"),
|
|
722
|
+
dataTier=getattr(parentOutputModule, "dataTier"),
|
|
723
|
+
filterName=getattr(parentOutputModule, "filterName"),
|
|
724
|
+
forceMerged=True, taskConf=taskConf)
|
|
725
|
+
|
|
726
|
+
self.addCleanupTask(parentTask, parentOutputModuleName, forceTaskName, dataTier)
|
|
727
|
+
if self.enableHarvesting and getattr(parentOutputModule, "dataTier") in ["DQMIO", "DQM"]:
|
|
728
|
+
self.addDQMHarvestTask(mergeTask, "Merged",
|
|
729
|
+
uploadProxy=self.dqmUploadProxy,
|
|
730
|
+
periodic_harvest_interval=self.periodicHarvestInterval,
|
|
731
|
+
doLogCollect=doLogCollect,
|
|
732
|
+
dqmHarvestUnit=self.dqmHarvestUnit,
|
|
733
|
+
cmsswVersion=cmsswVersion, scramArch=scramArch)
|
|
734
|
+
|
|
735
|
+
# only in the very end, in order to get it in for the children tasks as well
|
|
736
|
+
prepID = taskConf.get("PrepID") or parentTask.getPrepID()
|
|
737
|
+
mergeTask.setPrepID(prepID)
|
|
738
|
+
|
|
739
|
+
return mergeTask
|
|
740
|
+
|
|
741
|
+
def addCleanupTask(self, parentTask, parentOutputModuleName, forceTaskName=None, dataTier=''):
|
|
742
|
+
"""
|
|
743
|
+
_addCleanupTask_
|
|
744
|
+
|
|
745
|
+
Create a cleanup task to delete files produces by the parent task.
|
|
746
|
+
"""
|
|
747
|
+
if forceTaskName is None:
|
|
748
|
+
forceTaskName = parentTask.name()
|
|
749
|
+
|
|
750
|
+
cleanupTask = parentTask.addTask("%sCleanupUnmerged%s" % (forceTaskName, parentOutputModuleName))
|
|
751
|
+
self.addRuntimeMonitors(cleanupTask)
|
|
752
|
+
cleanupTask.setTaskType("Cleanup")
|
|
753
|
+
|
|
754
|
+
parentTaskCmssw = parentTask.getStep("cmsRun1")
|
|
755
|
+
cleanupTask.setInputReference(parentTaskCmssw, outputModule=parentOutputModuleName, dataTier=dataTier)
|
|
756
|
+
cleanupTask.setSplittingAlgorithm("SiblingProcessingBased", files_per_job=50)
|
|
757
|
+
|
|
758
|
+
cleanupStep = cleanupTask.makeStep("cleanupUnmerged%s" % parentOutputModuleName)
|
|
759
|
+
cleanupStep.setStepType("DeleteFiles")
|
|
760
|
+
cleanupTask.applyTemplates()
|
|
761
|
+
|
|
762
|
+
# TODO: for StepChain, it will still use the Step1 PrepID. It has to be fixed
|
|
763
|
+
cleanupTask.setPrepID(parentTask.getPrepID())
|
|
764
|
+
|
|
765
|
+
return
|
|
766
|
+
|
|
767
|
+
def addDQMHarvestTask(self, parentTask, parentOutputModuleName, uploadProxy=None,
|
|
768
|
+
periodic_harvest_interval=0, periodic_harvest_sibling=False,
|
|
769
|
+
parentStepName="cmsRun1", doLogCollect=True, dqmHarvestUnit="byRun",
|
|
770
|
+
cmsswVersion=None, scramArch=None):
|
|
771
|
+
"""
|
|
772
|
+
_addDQMHarvestTask_
|
|
773
|
+
|
|
774
|
+
Create a DQM harvest task to harvest the files produces by the parent task.
|
|
775
|
+
"""
|
|
776
|
+
cmsswVersion = cmsswVersion or self.frameworkVersion
|
|
777
|
+
scramArch = scramArch or self.scramArch
|
|
778
|
+
|
|
779
|
+
if periodic_harvest_interval:
|
|
780
|
+
harvestType = "Periodic"
|
|
781
|
+
else:
|
|
782
|
+
harvestType = "EndOfRun"
|
|
783
|
+
|
|
784
|
+
harvestTask = parentTask.addTask("%s%sDQMHarvest%s" % (parentTask.name(),
|
|
785
|
+
harvestType,
|
|
786
|
+
parentOutputModuleName))
|
|
787
|
+
self.addRuntimeMonitors(harvestTask)
|
|
788
|
+
harvestTaskCmssw = harvestTask.makeStep("cmsRun1")
|
|
789
|
+
harvestTaskCmssw.setStepType("CMSSW")
|
|
790
|
+
|
|
791
|
+
harvestTaskUpload = harvestTaskCmssw.addStep("upload1")
|
|
792
|
+
harvestTaskUpload.setStepType("DQMUpload")
|
|
793
|
+
harvestTaskLogArch = harvestTaskCmssw.addStep("logArch1")
|
|
794
|
+
harvestTaskLogArch.setStepType("LogArchive")
|
|
795
|
+
|
|
796
|
+
harvestTask.setTaskLogBaseLFN(self.unmergedLFNBase)
|
|
797
|
+
if doLogCollect:
|
|
798
|
+
taskNameLC = "%s%s%sDQMHarvestLogCollect" % (parentTask.name(),
|
|
799
|
+
parentOutputModuleName,
|
|
800
|
+
harvestType)
|
|
801
|
+
self.addLogCollectTask(harvestTask, taskName=taskNameLC,
|
|
802
|
+
cmsswVersion=cmsswVersion, scramArch=scramArch)
|
|
803
|
+
|
|
804
|
+
harvestTask.setTaskType("Harvesting")
|
|
805
|
+
harvestTask.applyTemplates()
|
|
806
|
+
|
|
807
|
+
harvestTaskCmsswHelper = harvestTaskCmssw.getTypeHelper()
|
|
808
|
+
harvestTaskCmsswHelper.cmsswSetup(cmsswVersion,
|
|
809
|
+
softwareEnvironment="",
|
|
810
|
+
scramArch=scramArch)
|
|
811
|
+
|
|
812
|
+
harvestTaskCmsswHelper.setErrorDestinationStep(stepName=harvestTaskLogArch.name())
|
|
813
|
+
harvestTaskCmsswHelper.setGlobalTag(self.globalTag)
|
|
814
|
+
harvestTaskCmsswHelper.setOverrideCatalog(self.overrideCatalog)
|
|
815
|
+
|
|
816
|
+
harvestTaskCmsswHelper.setUserLFNBase("/")
|
|
817
|
+
|
|
818
|
+
parentTaskCmssw = parentTask.getStep(parentStepName)
|
|
819
|
+
parentOutputModule = parentTaskCmssw.getOutputModule(parentOutputModuleName)
|
|
820
|
+
|
|
821
|
+
harvestTask.setInputReference(parentTaskCmssw, outputModule=parentOutputModuleName)
|
|
822
|
+
|
|
823
|
+
harvestTask.setSplittingAlgorithm("Harvest",
|
|
824
|
+
periodic_harvest_interval=periodic_harvest_interval,
|
|
825
|
+
periodic_harvest_sibling=periodic_harvest_sibling,
|
|
826
|
+
dqmHarvestUnit=dqmHarvestUnit)
|
|
827
|
+
|
|
828
|
+
datasetName = "/%s/%s/%s" % (getattr(parentOutputModule, "primaryDataset"),
|
|
829
|
+
getattr(parentOutputModule, "processedDataset"),
|
|
830
|
+
getattr(parentOutputModule, "dataTier"))
|
|
831
|
+
|
|
832
|
+
if self.dqmConfigCacheID is not None:
|
|
833
|
+
harvestTaskCmsswHelper.setConfigCache(self.configCacheUrl, self.dqmConfigCacheID, self.couchDBName)
|
|
834
|
+
harvestTaskCmsswHelper.setDatasetName(datasetName)
|
|
835
|
+
else:
|
|
836
|
+
scenarioArgs = {'globalTag': self.globalTag,
|
|
837
|
+
'datasetName': datasetName,
|
|
838
|
+
'runNumber': self.runNumber,
|
|
839
|
+
'dqmSeq': self.dqmSequences}
|
|
840
|
+
if self.globalTagConnect:
|
|
841
|
+
scenarioArgs['globalTagConnect'] = self.globalTagConnect
|
|
842
|
+
if getattr(parentOutputModule, "dataTier") == "DQMIO":
|
|
843
|
+
scenarioArgs['newDQMIO'] = True
|
|
844
|
+
harvestTaskCmsswHelper.setDataProcessingConfig(self.procScenario,
|
|
845
|
+
"dqmHarvesting",
|
|
846
|
+
**scenarioArgs)
|
|
847
|
+
|
|
848
|
+
harvestTaskUploadHelper = harvestTaskUpload.getTypeHelper()
|
|
849
|
+
harvestTaskUploadHelper.setProxyFile(uploadProxy)
|
|
850
|
+
harvestTaskUploadHelper.setServerURL(self.dqmUploadUrl)
|
|
851
|
+
|
|
852
|
+
# if this was a Periodic harvesting add another for EndOfRun
|
|
853
|
+
if periodic_harvest_interval:
|
|
854
|
+
self.addDQMHarvestTask(parentTask=parentTask, parentOutputModuleName=parentOutputModuleName,
|
|
855
|
+
uploadProxy=uploadProxy,
|
|
856
|
+
periodic_harvest_interval=0, periodic_harvest_sibling=True,
|
|
857
|
+
parentStepName=parentStepName, doLogCollect=doLogCollect,
|
|
858
|
+
dqmHarvestUnit=dqmHarvestUnit,
|
|
859
|
+
cmsswVersion=cmsswVersion, scramArch=scramArch)
|
|
860
|
+
|
|
861
|
+
return
|
|
862
|
+
|
|
863
|
+
def setupPileup(self, task, pileupConfig, stepName=None):
|
|
864
|
+
"""
|
|
865
|
+
_setupPileup_
|
|
866
|
+
|
|
867
|
+
Setup pileup for every CMSSW step in the task, unless a stepName
|
|
868
|
+
is given - StepChain case - then only setup pileup for that specific
|
|
869
|
+
step (cmsRun1, cmsRun2, etc).
|
|
870
|
+
pileupConfig has the following data structure:
|
|
871
|
+
{'mc': ['/mc_pd/procds/tier'], 'data': ['/data_pd/procds/tier']}
|
|
872
|
+
"""
|
|
873
|
+
for puType, puList in viewitems(pileupConfig):
|
|
874
|
+
task.setInputPileupDatasets(puList)
|
|
875
|
+
|
|
876
|
+
if stepName:
|
|
877
|
+
stepHelper = task.getStepHelper(stepName)
|
|
878
|
+
stepHelper.setupPileup(pileupConfig, self.dbsUrl)
|
|
879
|
+
return
|
|
880
|
+
|
|
881
|
+
for stepName in task.listAllStepNames():
|
|
882
|
+
step = task.getStep(stepName)
|
|
883
|
+
if step.stepType() != "CMSSW":
|
|
884
|
+
continue
|
|
885
|
+
stepHelper = task.getStepHelper(stepName)
|
|
886
|
+
stepHelper.setupPileup(pileupConfig, self.dbsUrl)
|
|
887
|
+
|
|
888
|
+
return
|
|
889
|
+
|
|
890
|
+
def validateSchema(self, schema):
|
|
891
|
+
"""
|
|
892
|
+
_validateSchema_
|
|
893
|
+
|
|
894
|
+
Validate the schema prior to building the workload
|
|
895
|
+
This function should be overridden by individual specs
|
|
896
|
+
|
|
897
|
+
If something breaks, raise a WMSpecFactoryException. A message
|
|
898
|
+
in that excpetion will be transferred to an HTTP Error later on.
|
|
899
|
+
"""
|
|
900
|
+
pass
|
|
901
|
+
|
|
902
|
+
def validateWorkload(self, workload):
|
|
903
|
+
"""
|
|
904
|
+
_validateWorkload_
|
|
905
|
+
|
|
906
|
+
Just in case you have something that you want to validate
|
|
907
|
+
after the workload gets created, this is where you should
|
|
908
|
+
put it.
|
|
909
|
+
|
|
910
|
+
If something breaks, raise a WMSpecFactoryException. A message
|
|
911
|
+
in that exception will be transferred to an HTTP Error later on.
|
|
912
|
+
"""
|
|
913
|
+
pass
|
|
914
|
+
|
|
915
|
+
def factoryWorkloadConstruction(self, workloadName, arguments):
|
|
916
|
+
"""
|
|
917
|
+
_factoryWorkloadConstruction_
|
|
918
|
+
|
|
919
|
+
Master build for ReqMgr - builds the entire workload
|
|
920
|
+
and also performs the proper validation.
|
|
921
|
+
|
|
922
|
+
Named this way so that nobody else will try to use this name.
|
|
923
|
+
"""
|
|
924
|
+
if arguments.get('RequestType') == 'Resubmission':
|
|
925
|
+
self.validateSchema(schema=arguments)
|
|
926
|
+
else:
|
|
927
|
+
self.masterValidation(schema=arguments)
|
|
928
|
+
self.validateSchema(schema=arguments)
|
|
929
|
+
|
|
930
|
+
workload = self.__call__(workloadName=workloadName, arguments=arguments)
|
|
931
|
+
self.validateWorkload(workload)
|
|
932
|
+
|
|
933
|
+
return workload
|
|
934
|
+
|
|
935
|
+
def masterValidation(self, schema):
|
|
936
|
+
"""
|
|
937
|
+
_masterValidation_
|
|
938
|
+
|
|
939
|
+
This is validation for global inputs that have to be implemented for
|
|
940
|
+
multiple types of workflows in the exact same way.
|
|
941
|
+
|
|
942
|
+
This uses programatically the definitions in getWorkloadCreateArgs
|
|
943
|
+
for type-checking, existence, null tests and the specific validation functions.
|
|
944
|
+
|
|
945
|
+
Any spec-specific extras are implemented in the overriden validateSchema
|
|
946
|
+
"""
|
|
947
|
+
# Validate the arguments according to the workload arguments definition
|
|
948
|
+
argumentDefinition = self.getWorkloadCreateArgs()
|
|
949
|
+
try:
|
|
950
|
+
validateArgumentsCreate(schema, argumentDefinition)
|
|
951
|
+
except Exception as ex:
|
|
952
|
+
self.raiseValidationException(str(ex))
|
|
953
|
+
return
|
|
954
|
+
|
|
955
|
+
def raiseValidationException(self, msg):
|
|
956
|
+
"""
|
|
957
|
+
_raiseValidationException_
|
|
958
|
+
|
|
959
|
+
Inbuilt method for raising exception so people don't have
|
|
960
|
+
to import WMSpecFactoryException all over the place.
|
|
961
|
+
"""
|
|
962
|
+
|
|
963
|
+
logging.error("About to raise exception %s", msg)
|
|
964
|
+
raise WMSpecFactoryException(message=msg)
|
|
965
|
+
|
|
966
|
+
def validateConfigCacheExists(self, configID, configCacheUrl, couchDBName,
|
|
967
|
+
getOutputModules=True):
|
|
968
|
+
"""
|
|
969
|
+
_validateConfigCacheExists_
|
|
970
|
+
|
|
971
|
+
If we have a configCache, we should probably try and load it.
|
|
972
|
+
"""
|
|
973
|
+
|
|
974
|
+
if configID == '' or configID == ' ':
|
|
975
|
+
self.raiseValidationException(msg="ConfigCacheID is invalid and cannot be loaded")
|
|
976
|
+
|
|
977
|
+
if (configCacheUrl, couchDBName) in self.config_cache:
|
|
978
|
+
configCache = self.config_cache[(configCacheUrl, couchDBName)]
|
|
979
|
+
else:
|
|
980
|
+
configCache = ConfigCache(dbURL=configCacheUrl, couchDBName=couchDBName, detail=getOutputModules)
|
|
981
|
+
self.config_cache[(configCacheUrl, couchDBName)] = configCache
|
|
982
|
+
|
|
983
|
+
try:
|
|
984
|
+
# if detail option is set return outputModules
|
|
985
|
+
return configCache.validate(configID)
|
|
986
|
+
except ConfigCacheException as ex:
|
|
987
|
+
self.raiseValidationException(str(ex))
|
|
988
|
+
|
|
989
|
+
@staticmethod
|
|
990
|
+
def getWorkloadCreateArgs():
|
|
991
|
+
"""
|
|
992
|
+
_getWorkloadCreateArgs_
|
|
993
|
+
|
|
994
|
+
This represents the authoritative list of request arguments that are
|
|
995
|
+
allowed by the current spec class during request creation
|
|
996
|
+
The list is formatted as a 2-level dictionary, the keys in the first level
|
|
997
|
+
are the identifiers for the arguments processed by the current spec.
|
|
998
|
+
The second level dictionary contains the information about that argument for
|
|
999
|
+
validation:
|
|
1000
|
+
- default: Gives a default value if not provided,
|
|
1001
|
+
this default value usually is good enough for a standard workflow. If the argument is not optional
|
|
1002
|
+
and a default value is provided, this is only meant for test purposes.
|
|
1003
|
+
- type: A function that verifies the type of the argument, it may also cast it into the appropiate python type.
|
|
1004
|
+
If the input is not compatible with the expected type, this method must throw an exception.
|
|
1005
|
+
- optional: This boolean value indicates if the value must be provided or not by user
|
|
1006
|
+
or inherited class can overwrite with default value.
|
|
1007
|
+
- assign_optional: This boolean value indicates if the value must be provided when workflow is assigned if False.
|
|
1008
|
+
|
|
1009
|
+
- validate: A function which validates the input after type casting,
|
|
1010
|
+
it returns True if the input is valid, it can throw exceptions on invalid input.
|
|
1011
|
+
- attr: This represents the name of the attribute corresponding to the argument in the WMSpec object.
|
|
1012
|
+
- null: This indicates if the argument can have None as its value.
|
|
1013
|
+
|
|
1014
|
+
If above is not specified, automatically set by following default value
|
|
1015
|
+
- default: None
|
|
1016
|
+
- type: str
|
|
1017
|
+
- optional: True
|
|
1018
|
+
- assign_optional: True
|
|
1019
|
+
- validate: None
|
|
1020
|
+
- attr: change first letter to lower case
|
|
1021
|
+
- null: False
|
|
1022
|
+
Example:
|
|
1023
|
+
{
|
|
1024
|
+
RequestPriority : {'default' : 0,
|
|
1025
|
+
'type' : int,
|
|
1026
|
+
'optional' : False,
|
|
1027
|
+
'validate' : lambda x : x > 0,
|
|
1028
|
+
'attr' : 'priority',
|
|
1029
|
+
'null' : False}
|
|
1030
|
+
}
|
|
1031
|
+
This replaces the old syntax in the __call__ of:
|
|
1032
|
+
|
|
1033
|
+
self.priority = arguments.get("RequestPriority", 0)
|
|
1034
|
+
"""
|
|
1035
|
+
# if key is not specified (and argument is optional), then it's set to the default value
|
|
1036
|
+
arguments = {"RequestType": {"default": "StdBase", "optional": False},
|
|
1037
|
+
"RequestString": {"optional": False, "null": False},
|
|
1038
|
+
# default value will be AcquisitionEra except when AcquistionEra is dict
|
|
1039
|
+
"Campaign": {"default": "", "optional": True, "validate": campaign},
|
|
1040
|
+
"CMSSWVersion": {"validate": lambda x: x in releases(),
|
|
1041
|
+
"optional": False, "attr": "frameworkVersion"},
|
|
1042
|
+
"ScramArch": {"validate": lambda x: all([y in architectures() for y in x]),
|
|
1043
|
+
"optional": False, "type": makeNonEmptyList},
|
|
1044
|
+
"GlobalTag": {"optional": False, "null": False},
|
|
1045
|
+
"ConfigCacheID": {"optional": False},
|
|
1046
|
+
|
|
1047
|
+
"RequestPriority": {"default": 8000, "type": int, "attr": "priority",
|
|
1048
|
+
"validate": lambda x: (x >= 0 and x < 1e6)},
|
|
1049
|
+
"Group": {"default": "DATAOPS"},
|
|
1050
|
+
"PrepID": {"default": None, "null": True},
|
|
1051
|
+
"OpenRunningTimeout": {"default": 0, "type": int, "null": False,
|
|
1052
|
+
"validate": lambda x: x >= 0},
|
|
1053
|
+
"GlobalTagConnect": {"null": True},
|
|
1054
|
+
"LumiList": {"default": {}, "type": makeLumiList},
|
|
1055
|
+
"DbsUrl": {"default": "https://cmsweb-prod.cern.ch/dbs/prod/global/DBSReader",
|
|
1056
|
+
"null": True, "validate": checkDBSURL},
|
|
1057
|
+
"DashboardHost": {"default": "cms-jobmon.cern.ch"},
|
|
1058
|
+
"DashboardPort": {"default": 8884, "type": int,
|
|
1059
|
+
"validate": lambda x: x > 0},
|
|
1060
|
+
"TimePerEvent": {"default": 12.0, "type": float, "validate": lambda x: x > 0},
|
|
1061
|
+
"SizePerEvent": {"default": 512.0, "type": float, "validate": lambda x: x > 0},
|
|
1062
|
+
"PeriodicHarvestInterval": {"default": 0, "type": int, "validate": lambda x: x >= 0},
|
|
1063
|
+
"DQMHarvestUnit": {"default": "byRun", "type": str, "attr": "dqmHarvestUnit"},
|
|
1064
|
+
"DQMUploadProxy": {"null": True, "attr": "dqmUploadProxy"},
|
|
1065
|
+
"DQMUploadUrl": {"default": "https://cmsweb.cern.ch/dqm/dev", "attr": "dqmUploadUrl"},
|
|
1066
|
+
"DQMSequences": {"default": [], "type": makeList, "attr": "dqmSequences"},
|
|
1067
|
+
"DQMConfigCacheID": {"null": True, "attr": "dqmConfigCacheID"},
|
|
1068
|
+
"EnableHarvesting": {"default": False, "type": strToBool},
|
|
1069
|
+
"EnableNewStageout": {"default": False, "type": strToBool},
|
|
1070
|
+
"IncludeParents": {"default": False, "type": strToBool},
|
|
1071
|
+
"ConfigCacheUrl": {"default": "https://cmsweb.cern.ch/couchdb", "validate": couchurl},
|
|
1072
|
+
"VoGroup": {"default": "unknown", "attr": "owner_vogroup"},
|
|
1073
|
+
"VoRole": {"default": "unknown", "attr": "owner_vorole"},
|
|
1074
|
+
"ValidStatus": {"default": "PRODUCTION",
|
|
1075
|
+
"validate": lambda x: x in ("PRODUCTION", "VALID")},
|
|
1076
|
+
"OverrideCatalog": {"null": True},
|
|
1077
|
+
"RunNumber": {"default": 0, "type": int},
|
|
1078
|
+
"RobustMerge": {"default": True, "type": strToBool},
|
|
1079
|
+
"Comments": {"default": ""},
|
|
1080
|
+
"SubRequestType": {"default": "", "validate": subRequestType},
|
|
1081
|
+
"RequiresGPU": {"default": "forbidden",
|
|
1082
|
+
"validate": lambda x: x in ("forbidden", "optional", "required")},
|
|
1083
|
+
"GPUParams": {"default": json.dumps(None), "validate": gpuParameters},
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
# FIXME (Alan on 27/Mar/017): maybe used by T0 during creation???
|
|
1087
|
+
"MinMergeSize": {"default": 2 * 1024 * 1024 * 1024, "type": int,
|
|
1088
|
+
"validate": lambda x: x > 0},
|
|
1089
|
+
"MaxMergeSize": {"default": 4 * 1024 * 1024 * 1024, "type": int,
|
|
1090
|
+
"validate": lambda x: x > 0},
|
|
1091
|
+
"MaxWaitTime": {"default": 24 * 3600, "type": int,
|
|
1092
|
+
"validate": lambda x: x > 0},
|
|
1093
|
+
"MaxMergeEvents": {"default": 100000000, "type": int,
|
|
1094
|
+
"validate": lambda x: x > 0},
|
|
1095
|
+
|
|
1096
|
+
# parameters that can be overwritten during assignment
|
|
1097
|
+
"AcquisitionEra": {"validate": acqname, "optional": False},
|
|
1098
|
+
"ProcessingString": {"validate": procstring, "optional": False},
|
|
1099
|
+
"ProcessingVersion": {"default": 1, "type": int, "validate": procversion},
|
|
1100
|
+
"Memory": {"default": 2300.0, "type": float, "validate": lambda x: x > 0},
|
|
1101
|
+
"Multicore": {"default": 1, "type": int, "validate": lambda x: x > 0},
|
|
1102
|
+
"EventStreams": {"type": int, "default": 0, "validate": lambda x: x >= 0, "null": True},
|
|
1103
|
+
"MergedLFNBase": {"default": "/store/data"},
|
|
1104
|
+
"UnmergedLFNBase": {"default": "/store/unmerged"},
|
|
1105
|
+
"DeleteFromSource": {"default": False, "type": strToBool},
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
# these arguments are internally set by ReqMgr2 and should not be provided by the user
|
|
1109
|
+
reqmgrArgs = {"Requestor": {"attr": "owner", "optional": False},
|
|
1110
|
+
"RequestorDN": {"attr": "owner_dn", "optional": False, "null": False},
|
|
1111
|
+
"RequestName": {"optional": False, "null": False, "validate": identifier},
|
|
1112
|
+
"RequestStatus": {"optional": False, "validate": lambda x: x == REQUEST_START_STATE},
|
|
1113
|
+
"RequestTransition": {"optional": False, "type": list},
|
|
1114
|
+
"PriorityTransition": {"optional": False, "type": list},
|
|
1115
|
+
"RequestDate": {"optional": False, "type": list},
|
|
1116
|
+
"CouchURL": {"default": "https://cmsweb.cern.ch/couchdb", "validate": couchurl},
|
|
1117
|
+
"CouchDBName": {"default": "reqmgr_config_cache", "type": str, "validate": identifier},
|
|
1118
|
+
"CouchWorkloadDBName": {"default": "reqmgr_workload_cache", "validate": identifier}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
arguments.update(reqmgrArgs)
|
|
1122
|
+
# Set defaults for the argument specification
|
|
1123
|
+
StdBase.setDefaultArgumentsProperty(arguments)
|
|
1124
|
+
|
|
1125
|
+
return arguments
|
|
1126
|
+
|
|
1127
|
+
@staticmethod
|
|
1128
|
+
def getWorkloadAssignArgs():
|
|
1129
|
+
"""
|
|
1130
|
+
_getWorkloadAssignArgs_
|
|
1131
|
+
|
|
1132
|
+
This represents the authoritative list of request arguments that are
|
|
1133
|
+
allowed by the current spec class during request assignment.
|
|
1134
|
+
|
|
1135
|
+
For more information on how these arguments are built, please have a look
|
|
1136
|
+
at the docstring for getWorkloadCreateArgs.
|
|
1137
|
+
"""
|
|
1138
|
+
# if key is not specified (and argument is optional), then it's set to the default value
|
|
1139
|
+
arguments = {"RequestPriority": {"type": int, "attr": "priority",
|
|
1140
|
+
"validate": lambda x: (x >= 0 and x < 1e6)},
|
|
1141
|
+
"RequestStatus": {"assign_optional": False, "validate": lambda x: x == 'assigned'},
|
|
1142
|
+
"Team": {"default": "", "type": safeStr, "assign_optional": False,
|
|
1143
|
+
"validate": lambda x: len(x) > 0},
|
|
1144
|
+
"AcquisitionEra": {"validate": acqname, "assign_optional": True},
|
|
1145
|
+
"ProcessingString": {"validate": procstring, "assign_optional": True},
|
|
1146
|
+
"ProcessingVersion": {"type": int, "validate": procversion, "assign_optional": True},
|
|
1147
|
+
"Memory": {"type": float, "validate": lambda x: x > 0},
|
|
1148
|
+
"Multicore": {"type": int, "validate": lambda x: x > 0},
|
|
1149
|
+
"EventStreams": {"null": True, "type": int, "validate": lambda x: x >= 0},
|
|
1150
|
+
|
|
1151
|
+
"SiteBlacklist": {"default": [], "type": makeList,
|
|
1152
|
+
"validate": lambda x: all([cmsname(y) for y in x])},
|
|
1153
|
+
"SiteWhitelist": {"default": [], "type": makeNonEmptyList, "assign_optional": False,
|
|
1154
|
+
"validate": lambda x: all([cmsname(y) for y in x])},
|
|
1155
|
+
# PhEDEx subscription information
|
|
1156
|
+
"CustodialSites": {"default": [], "type": makeList, "assign_optional": True,
|
|
1157
|
+
"validate": lambda x: all([cmsname(y) for y in x])},
|
|
1158
|
+
"NonCustodialSites": {"default": [], "type": makeList, "assign_optional": True,
|
|
1159
|
+
"validate": lambda x: all([cmsname(y) for y in x])},
|
|
1160
|
+
"SubscriptionPriority": {"default": "Low", "assign_optional": True,
|
|
1161
|
+
"validate": lambda x: x.lower() in RUCIO_RULES_PRIORITY},
|
|
1162
|
+
"DeleteFromSource": {"default": False, "type": strToBool},
|
|
1163
|
+
# merge settings
|
|
1164
|
+
"UnmergedLFNBase": {"assign_optional": True},
|
|
1165
|
+
"MergedLFNBase": {"assign_optional": True},
|
|
1166
|
+
"MinMergeSize": {"default": 2 * 1024 * 1024 * 1024, "type": int,
|
|
1167
|
+
"validate": lambda x: x > 0},
|
|
1168
|
+
"MaxMergeSize": {"default": 4 * 1024 * 1024 * 1024, "type": int,
|
|
1169
|
+
"validate": lambda x: x > 0},
|
|
1170
|
+
"MaxWaitTime": {"default": 24 * 3600, "type": int,
|
|
1171
|
+
"validate": lambda x: x > 0},
|
|
1172
|
+
"MaxMergeEvents": {"default": 100000000, "type": int,
|
|
1173
|
+
"validate": lambda x: x > 0},
|
|
1174
|
+
# data location management
|
|
1175
|
+
"TrustSitelists": {"default": False, "type": strToBool},
|
|
1176
|
+
"TrustPUSitelists": {"default": False, "type": strToBool},
|
|
1177
|
+
"AllowOpportunistic": {"default": False, "type": strToBool},
|
|
1178
|
+
# from assignment: performance monitoring data
|
|
1179
|
+
"SoftTimeout": {"default": 129600, "type": int, "validate": lambda x: x > 0},
|
|
1180
|
+
"GracePeriod": {"default": 300, "type": int, "validate": lambda x: x > 0},
|
|
1181
|
+
"HardTimeout": {"default": 129600 + 300, "type": int, "validate": lambda x: x > 0},
|
|
1182
|
+
# Block closing information
|
|
1183
|
+
"BlockCloseMaxWaitTime": {"default": 66400, "type": int, "validate": lambda x: x > 0},
|
|
1184
|
+
"BlockCloseMaxFiles": {"default": 500, "type": int, "validate": lambda x: x > 0},
|
|
1185
|
+
"BlockCloseMaxEvents": {"default": 25000000, "type": int, "validate": lambda x: x > 0},
|
|
1186
|
+
"BlockCloseMaxSize": {"default": 5000000000000, "type": int, "validate": lambda x: x > 0},
|
|
1187
|
+
# dashboard activity
|
|
1188
|
+
"Dashboard": {"default": "production", "type": str, "validate": activity},
|
|
1189
|
+
# Override parameters for step (EOS log location, etc
|
|
1190
|
+
# set to "" string or None for eos-lfn-prefix if you don't want to save the log in eos
|
|
1191
|
+
"Override": {"default": {"eos-lfn-prefix": "root://eoscms.cern.ch//eos/cms/store/logs/prod/recent/PRODUCTION"},
|
|
1192
|
+
"type": dict},
|
|
1193
|
+
# Rucio rule subscription lifetime (used in ContainerRules by T0)
|
|
1194
|
+
"DatasetLifetime": {"default": 0, "type": int, "assign_optional": True, "validate": lambda x: x >= 0},
|
|
1195
|
+
}
|
|
1196
|
+
# Set defaults for the argument specification
|
|
1197
|
+
StdBase.setDefaultArgumentsProperty(arguments)
|
|
1198
|
+
|
|
1199
|
+
return arguments
|
|
1200
|
+
|
|
1201
|
+
@staticmethod
|
|
1202
|
+
def getChainCreateArgs(firstTask=False, generator=False):
|
|
1203
|
+
"""
|
|
1204
|
+
_getChainCreateArgs_
|
|
1205
|
+
|
|
1206
|
+
This represents the authoritative list of request arguments that are
|
|
1207
|
+
allowed in each chain (Step/Task) of chained request, during request creation.
|
|
1208
|
+
Additional especific arguments must be defined inside each spec class.
|
|
1209
|
+
|
|
1210
|
+
For more information on how these arguments are built, please have a look
|
|
1211
|
+
at the docstring for getWorkloadCreateArgs.
|
|
1212
|
+
"""
|
|
1213
|
+
arguments = {'AcquisitionEra': {'optional': True, 'validate': acqname},
|
|
1214
|
+
# Campaign at chain level has no meaning but for CompOps/McM bookkeeping
|
|
1215
|
+
"Campaign": {"optional": True, "validate": campaign},
|
|
1216
|
+
'BlockBlacklist': {'default': [], 'null': False, 'optional': True, 'type': makeList,
|
|
1217
|
+
'validate': lambda x: all([block(y) for y in x])},
|
|
1218
|
+
'BlockWhitelist': {'default': [], 'null': False, 'optional': True, 'type': makeList,
|
|
1219
|
+
'validate': lambda x: all([block(y) for y in x])},
|
|
1220
|
+
'CMSSWVersion': {'attr': 'frameworkVersion', 'null': True, 'optional': True,
|
|
1221
|
+
'validate': lambda x: x in releases()},
|
|
1222
|
+
'ConfigCacheID': {'optional': False, 'type': str},
|
|
1223
|
+
'DataPileup': {'default': None, 'null': False, 'optional': True, 'type': str,
|
|
1224
|
+
'validate': dataset},
|
|
1225
|
+
# for task/step level, the default EventStreams value (0) comes from the top level
|
|
1226
|
+
'EventStreams': {'null': True, 'type': int, 'validate': lambda x: x >= 0},
|
|
1227
|
+
'EventsPerJob': {'null': True, 'type': int, 'validate': lambda x: x > 0},
|
|
1228
|
+
'EventsPerLumi': {'default': None, 'null': True, 'optional': True, 'type': int,
|
|
1229
|
+
'validate': lambda x: x > 0},
|
|
1230
|
+
'FilesPerJob': {'default': 1, 'null': False, 'optional': True, 'type': int,
|
|
1231
|
+
'validate': lambda x: x > 0},
|
|
1232
|
+
'FilterEfficiency': {'default': 1.0, 'null': False, 'optional': True, 'type': float,
|
|
1233
|
+
'validate': lambda x: x > 0.0},
|
|
1234
|
+
'GlobalTag': {'optional': False, 'type': str},
|
|
1235
|
+
"IncludeParents": {"null": False, "default": False, "type": strToBool},
|
|
1236
|
+
'InputDataset': {'null': False, 'optional': generator or not firstTask, 'validate': dataset},
|
|
1237
|
+
'InputFromOutputModule': {'default': None, 'null': False, 'optional': firstTask},
|
|
1238
|
+
'KeepOutput': {'default': True, 'null': False, 'optional': True, 'type': strToBool},
|
|
1239
|
+
'LheInputFiles': {'default': False, 'null': False, 'optional': True, 'type': strToBool},
|
|
1240
|
+
'LumiList': {'default': {}, 'type': makeLumiList},
|
|
1241
|
+
'LumisPerJob': {'default': 8, 'null': False, 'optional': True, 'type': int,
|
|
1242
|
+
'validate': lambda x: x > 0},
|
|
1243
|
+
'MCPileup': {'default': None, 'null': False, 'optional': True, 'type': str,
|
|
1244
|
+
'validate': dataset},
|
|
1245
|
+
'Memory': {'default': None, 'null': True, 'type': float, 'validate': lambda x: x > 0},
|
|
1246
|
+
'Multicore': {'default': 0, 'type': int, 'validate': lambda x: x > 0},
|
|
1247
|
+
'PrepID': {'default': None, 'null': True, 'optional': True, 'type': str},
|
|
1248
|
+
"RequiresGPU": {"default": "forbidden",
|
|
1249
|
+
"validate": lambda x: x in ("forbidden", "optional", "required")},
|
|
1250
|
+
"GPUParams": {"default": json.dumps(None), "validate": gpuParameters},
|
|
1251
|
+
'PrimaryDataset': {'null': True, 'validate': primdataset, 'attr': 'inputPrimaryDataset'},
|
|
1252
|
+
'ProcessingString': {'optional': True, 'validate': procstring},
|
|
1253
|
+
'ProcessingVersion': {'type': int, 'validate': procversion},
|
|
1254
|
+
'RequestNumEvents': {'null': False, 'optional': not generator, 'type': int,
|
|
1255
|
+
'validate': lambda x: x > 0},
|
|
1256
|
+
'RunBlacklist': {'default': [], 'null': False, 'optional': True, 'type': makeList,
|
|
1257
|
+
'validate': lambda x: all([isinstance(y, int) and int(y) > 0 for y in x])},
|
|
1258
|
+
'RunWhitelist': {'default': [], 'null': False, 'optional': True, 'type': makeList,
|
|
1259
|
+
'validate': lambda x: all([isinstance(y, int) and int(y) > 0 for y in x])},
|
|
1260
|
+
'ScramArch': {'null': True, 'optional': True, 'type': makeNonEmptyList,
|
|
1261
|
+
'validate': lambda x: all([y in architectures() for y in x])},
|
|
1262
|
+
'Seeding': {'default': 'AutomaticSeeding', 'null': False, 'optional': True, 'type': str,
|
|
1263
|
+
'validate': lambda x: x in ["ReproducibleSeeding", "AutomaticSeeding"]},
|
|
1264
|
+
'SplittingAlgo': {'default': 'EventAwareLumiBased', 'null': False, 'optional': True,
|
|
1265
|
+
'validate': lambda x: x in ["EventBased", "LumiBased",
|
|
1266
|
+
"EventAwareLumiBased", "FileBased"]}}
|
|
1267
|
+
|
|
1268
|
+
# Set defaults for the argument specification
|
|
1269
|
+
StdBase.setDefaultArgumentsProperty(arguments)
|
|
1270
|
+
|
|
1271
|
+
return arguments
|
|
1272
|
+
|
|
1273
|
+
@staticmethod
|
|
1274
|
+
def setDefaultArgumentsProperty(arguments):
|
|
1275
|
+
for arg in arguments:
|
|
1276
|
+
arguments[arg].setdefault("default", None)
|
|
1277
|
+
arguments[arg].setdefault("type", str)
|
|
1278
|
+
arguments[arg].setdefault("optional", True)
|
|
1279
|
+
arguments[arg].setdefault("assign_optional", True)
|
|
1280
|
+
arguments[arg].setdefault("null", False)
|
|
1281
|
+
arguments[arg].setdefault("validate", None)
|
|
1282
|
+
arguments[arg].setdefault("attr", arg[:1].lower() + arg[1:])
|
|
1283
|
+
return
|
|
1284
|
+
|
|
1285
|
+
@classmethod
|
|
1286
|
+
def getTestArguments(cls):
|
|
1287
|
+
"""
|
|
1288
|
+
_getTestArguments_
|
|
1289
|
+
|
|
1290
|
+
Using the getWorkloadCreateArgs definition, build a request schema
|
|
1291
|
+
that may pass basic validation and create successfully a workload
|
|
1292
|
+
of the current spec. Only for testing purposes! Any use of this function
|
|
1293
|
+
outside of unit tests and integration tests may put your life in danger.
|
|
1294
|
+
Note that in some cases like ConfigCacheID, there is no default that will work
|
|
1295
|
+
and tests should specifically provide one.
|
|
1296
|
+
"""
|
|
1297
|
+
workloadDefinition = cls.getWorkloadCreateArgs()
|
|
1298
|
+
schema = {}
|
|
1299
|
+
for arg in workloadDefinition:
|
|
1300
|
+
# Dashboard parameter must be re-defined for test purposes
|
|
1301
|
+
if arg == "DashboardHost":
|
|
1302
|
+
schema[arg] = "127.0.0.1"
|
|
1303
|
+
elif arg == "ConfigCacheUrl":
|
|
1304
|
+
from os import environ
|
|
1305
|
+
schema[arg] = environ["COUCHURL"]
|
|
1306
|
+
elif arg == "RequestDate":
|
|
1307
|
+
from time import gmtime
|
|
1308
|
+
schema[arg] = gmtime()[:6]
|
|
1309
|
+
elif arg == "RequestTransition":
|
|
1310
|
+
from time import time
|
|
1311
|
+
schema[arg] = [{"Status": REQUEST_START_STATE, "UpdateTime": int(time()), "DN": "Fake_DN"}]
|
|
1312
|
+
elif arg == "PriorityTransition":
|
|
1313
|
+
from time import time
|
|
1314
|
+
schema[arg] = [{"Priority": REQUEST_START_STATE, "UpdateTime": int(time()), "DN": "Fake_DN"}]
|
|
1315
|
+
elif arg == "RequestStatus":
|
|
1316
|
+
schema[arg] = REQUEST_START_STATE
|
|
1317
|
+
elif arg == "CouchDBName":
|
|
1318
|
+
schema[arg] = "reqmgr_config_cache_t"
|
|
1319
|
+
elif arg == "ScramArch":
|
|
1320
|
+
schema[arg] = "slc6_amd64_gcc491"
|
|
1321
|
+
elif arg == "SiteWhitelist":
|
|
1322
|
+
schema[arg] = ['T2_XX_SiteA', 'T2_XX_SiteB', 'T2_XX_SiteC']
|
|
1323
|
+
elif arg == "GlobalTag":
|
|
1324
|
+
schema[arg] = "GT_DP_V1"
|
|
1325
|
+
elif arg == "InputDataset":
|
|
1326
|
+
schema[arg] = "/MinimumBias/ComissioningHI-v1/RAW"
|
|
1327
|
+
elif not workloadDefinition[arg]["optional"]:
|
|
1328
|
+
if workloadDefinition[arg]["type"] == str:
|
|
1329
|
+
if arg == "InputDataset":
|
|
1330
|
+
schema[arg] = "/MinimumBias/ComissioningHI-v1/RAW"
|
|
1331
|
+
elif arg == "CMSSWVersion":
|
|
1332
|
+
schema[arg] = "CMSSW_7_6_2"
|
|
1333
|
+
elif arg == "RequestType":
|
|
1334
|
+
schema[arg] = workloadDefinition[arg]['default']
|
|
1335
|
+
else:
|
|
1336
|
+
schema[arg] = "FAKE"
|
|
1337
|
+
elif workloadDefinition[arg]["type"] == int or workloadDefinition[arg]["type"] == float:
|
|
1338
|
+
schema[arg] = 1
|
|
1339
|
+
else: # A non-optional list or similar. Just copy.
|
|
1340
|
+
schema[arg] = workloadDefinition[arg]['default']
|
|
1341
|
+
else:
|
|
1342
|
+
schema[arg] = workloadDefinition[arg]['default']
|
|
1343
|
+
|
|
1344
|
+
taskStep = {'ConfigCacheID': 'FAKE',
|
|
1345
|
+
'PrimaryDataset': 'FAKE',
|
|
1346
|
+
'EventsPerJob': 100,
|
|
1347
|
+
'GlobalTag': 'GT_DP_V1',
|
|
1348
|
+
'RequestNumEvents': 1000000,
|
|
1349
|
+
'Seeding': 'AutomaticSeeding',
|
|
1350
|
+
'SplittingAlgo': 'EventBased'}
|
|
1351
|
+
if schema['RequestType'] == 'TaskChain':
|
|
1352
|
+
schema['Task1'] = taskStep
|
|
1353
|
+
schema['Task1'].update({'TaskName': 'Task1Name_Test',
|
|
1354
|
+
'TimePerEvent': 123})
|
|
1355
|
+
elif schema['RequestType'] == 'StepChain':
|
|
1356
|
+
schema['Step1'] = taskStep
|
|
1357
|
+
schema['Step1'].update({'StepName': 'Step1Name_Test'})
|
|
1358
|
+
|
|
1359
|
+
return schema
|
|
1360
|
+
|
|
1361
|
+
@classmethod
|
|
1362
|
+
def getAssignTestArguments(cls):
|
|
1363
|
+
"""
|
|
1364
|
+
_getAssignTestArguments_
|
|
1365
|
+
|
|
1366
|
+
Using the getWorkloadAssignArgs definition, build a request schema
|
|
1367
|
+
that may pass basic validation and successfully assign a workload
|
|
1368
|
+
of the current spec.
|
|
1369
|
+
|
|
1370
|
+
Only for testing purposes! Any use of this function outside of unit
|
|
1371
|
+
tests and integration tests may put your life in danger.
|
|
1372
|
+
"""
|
|
1373
|
+
workloadDefinition = cls.getWorkloadAssignArgs()
|
|
1374
|
+
schema = {}
|
|
1375
|
+
for arg in workloadDefinition:
|
|
1376
|
+
if arg == "SiteWhitelist":
|
|
1377
|
+
schema[arg] = ["T2_US_TEST_Site"]
|
|
1378
|
+
elif arg == "RequestStatus":
|
|
1379
|
+
schema[arg] = 'assigned'
|
|
1380
|
+
elif not workloadDefinition[arg]["assign_optional"]:
|
|
1381
|
+
if workloadDefinition[arg]["type"] == str:
|
|
1382
|
+
if arg == "Team":
|
|
1383
|
+
schema[arg] = "Test-Team"
|
|
1384
|
+
else:
|
|
1385
|
+
schema[arg] = "FAKE"
|
|
1386
|
+
elif workloadDefinition[arg]["type"] in (int, float):
|
|
1387
|
+
schema[arg] = 1
|
|
1388
|
+
else:
|
|
1389
|
+
schema[arg] = workloadDefinition[arg]['default']
|
|
1390
|
+
else:
|
|
1391
|
+
schema[arg] = workloadDefinition[arg]['default']
|
|
1392
|
+
return schema
|
|
1393
|
+
|
|
1394
|
+
@staticmethod
|
|
1395
|
+
def validateGPUSettings(schemaData):
|
|
1396
|
+
"""
|
|
1397
|
+
Method to check whether GPU settings have been provided for
|
|
1398
|
+
a workflow (or tasks/step) that requires GPUs (or has it set
|
|
1399
|
+
to optional).
|
|
1400
|
+
:param schemaData: workflow or task/step dictionary
|
|
1401
|
+
:return: nothing if validation is successful, otherwise raises an exception
|
|
1402
|
+
"""
|
|
1403
|
+
if schemaData.get("RequiresGPU") in ("optional", "required"):
|
|
1404
|
+
try:
|
|
1405
|
+
msg = "Request is set with RequiresGPU={}, ".format(schemaData["RequiresGPU"])
|
|
1406
|
+
if not json.loads(schemaData["GPUParams"]):
|
|
1407
|
+
msg += "but GPUParams argument is empty and/or incorrect."
|
|
1408
|
+
raise WMSpecFactoryException(msg)
|
|
1409
|
+
except KeyError:
|
|
1410
|
+
msg += "but GPUParams argument has not been provided."
|
|
1411
|
+
raise WMSpecFactoryException(msg)
|
|
1412
|
+
return True
|