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,448 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""
|
|
3
|
+
_StageOutMgrV2_
|
|
4
|
+
|
|
5
|
+
Refactoring of StageOutMgr -- for now, not accessed by default
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from builtins import range, object
|
|
11
|
+
|
|
12
|
+
import logging
|
|
13
|
+
import time
|
|
14
|
+
import traceback
|
|
15
|
+
|
|
16
|
+
# PyCharm likes to remove these two imports, but we cannot let it do it.
|
|
17
|
+
import WMCore.Storage.Backends
|
|
18
|
+
import WMCore.Storage.Plugins
|
|
19
|
+
|
|
20
|
+
from WMCore.Storage.Registry import RegistryError, retrieveStageOutImpl
|
|
21
|
+
from WMCore.Storage.SiteLocalConfig import loadSiteLocalConfig
|
|
22
|
+
from WMCore.Storage.StageOutError import StageOutError, StageOutFailure
|
|
23
|
+
|
|
24
|
+
log = logging
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class FileManager(object):
|
|
28
|
+
"""
|
|
29
|
+
_FileManager_
|
|
30
|
+
|
|
31
|
+
Object that handles modifying files in a site-specific way.
|
|
32
|
+
Supercedes StageInMgr, StageOutMgr, DeleteMgr
|
|
33
|
+
|
|
34
|
+
new easy to use interface:
|
|
35
|
+
deleteLFN(lfn) - tries to delete a certain LFN, returning details on success. Raising on failure
|
|
36
|
+
stageIn/stageOut - accepts a dict containing the details
|
|
37
|
+
PFN stores the local file name
|
|
38
|
+
LFN stores the lfn of the file, which will be mapped to a PFN
|
|
39
|
+
|
|
40
|
+
plugin implementations require:
|
|
41
|
+
newPfn = pluginImplementation.doTransfer( lfn, pfn, stageOut, pnn, command, options, protocol )
|
|
42
|
+
pluginImplementation.doDelete(pfn, pnn, command, options, protocol )
|
|
43
|
+
|
|
44
|
+
Which make one attempt to perform the action and raises if it doesn't succeed. It is the plugins
|
|
45
|
+
responsibility to verify that things are complete.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
def __init__(self, numberOfRetries=3, retryPauseTime=15, **overrideParams):
|
|
49
|
+
|
|
50
|
+
# set defaults
|
|
51
|
+
self.firstException = None
|
|
52
|
+
self.failed = {}
|
|
53
|
+
self.completedFiles = {}
|
|
54
|
+
self.override = False
|
|
55
|
+
self.overrideConf = overrideParams
|
|
56
|
+
self.substituteGUID = True
|
|
57
|
+
self.defaultMethod = {}
|
|
58
|
+
self.fallbacks = []
|
|
59
|
+
self.tfc = None
|
|
60
|
+
self.numberOfRetries = numberOfRetries
|
|
61
|
+
self.retryPauseTime = retryPauseTime
|
|
62
|
+
|
|
63
|
+
if overrideParams != {}:
|
|
64
|
+
log.critical("Override: %s" % overrideParams)
|
|
65
|
+
self.override = True
|
|
66
|
+
self.initialiseOverride()
|
|
67
|
+
else:
|
|
68
|
+
self.siteCfg = loadSiteLocalConfig()
|
|
69
|
+
self.initialiseSiteConf()
|
|
70
|
+
|
|
71
|
+
def stageFile(self, fileToStage, stageOut=True):
|
|
72
|
+
"""
|
|
73
|
+
_stageFile_
|
|
74
|
+
|
|
75
|
+
Use call to invoke transfers (either in or out)
|
|
76
|
+
input:
|
|
77
|
+
fileToStage: a dict containing at least:
|
|
78
|
+
LFN: the LFN for one end of the transfer, will be
|
|
79
|
+
mapped to a PFN before the transfer
|
|
80
|
+
PFN: (annoyingly) Not a PFN, but is the local filename
|
|
81
|
+
for the file when it's transferred to/from
|
|
82
|
+
stageOut: boolean for if the file is staged in or out
|
|
83
|
+
output:
|
|
84
|
+
dict from fileToStage with PFN, PNN, StageOutCommand added
|
|
85
|
+
|
|
86
|
+
I'm not entirely sure that StageOutCommand makes sense, but I don't want to break old code
|
|
87
|
+
-AMM 6/30/2010
|
|
88
|
+
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
log.info("Working on file: %s" % fileToStage['LFN'])
|
|
92
|
+
lfn = fileToStage['LFN']
|
|
93
|
+
localFileName = fileToStage['PFN']
|
|
94
|
+
self.firstException = None
|
|
95
|
+
|
|
96
|
+
log.info("Beginning %s" % ('StageOut' if stageOut else 'StageIn'))
|
|
97
|
+
|
|
98
|
+
# generate list of stageout methods we will try
|
|
99
|
+
stageOutMethods = [self.defaultMethod]
|
|
100
|
+
stageOutMethods.extend(self.fallbacks)
|
|
101
|
+
|
|
102
|
+
# loop over all the different methods. This unifies regular and fallback stuff. Nice.
|
|
103
|
+
methodCounter = 0
|
|
104
|
+
for currentMethod in stageOutMethods:
|
|
105
|
+
methodCounter += 1
|
|
106
|
+
# the PFN that is received here is mapped from the LFN
|
|
107
|
+
log.info("Getting transfer details for %s LFN %s" % (currentMethod, lfn))
|
|
108
|
+
(pnn, command, options, pfn, protocol) = \
|
|
109
|
+
self.getTransferDetails(lfn, currentMethod)
|
|
110
|
+
log.info("Using PNN: %s" % pnn)
|
|
111
|
+
log.info("Command: %s" % command)
|
|
112
|
+
log.info("Options: %s" % options)
|
|
113
|
+
log.info("Protocol: %s" % protocol)
|
|
114
|
+
log.info("Mapped LFN: %s" % lfn)
|
|
115
|
+
log.info(" to PFN: %s" % pfn)
|
|
116
|
+
log.info("LocalFileName: %s" % localFileName)
|
|
117
|
+
newPfn = self._doTransfer(currentMethod, methodCounter, localFileName, pfn, stageOut)
|
|
118
|
+
if newPfn:
|
|
119
|
+
log.info("Transfer succeeded: %s" % fileToStage)
|
|
120
|
+
fileToStage['PFN'] = newPfn
|
|
121
|
+
fileToStage['PNN'] = pnn
|
|
122
|
+
fileToStage['StageOutCommand'] = command
|
|
123
|
+
self.completedFiles[fileToStage['LFN']] = fileToStage
|
|
124
|
+
return fileToStage
|
|
125
|
+
else:
|
|
126
|
+
# transfer method didn't work, go to next one
|
|
127
|
+
continue
|
|
128
|
+
# if we're here, then nothing worked. transferfail.
|
|
129
|
+
log.error("Error in stageout")
|
|
130
|
+
if self.firstException:
|
|
131
|
+
raise self.firstException
|
|
132
|
+
else:
|
|
133
|
+
raise StageOutError("Error in stageout, this has been logged in the logs")
|
|
134
|
+
|
|
135
|
+
def deleteLFN(self, lfn):
|
|
136
|
+
"""
|
|
137
|
+
attempts to delete a file. will raise if none of the methods work, returns details otherwise
|
|
138
|
+
"""
|
|
139
|
+
log.info("Beginning to delete %s" % 'lfn')
|
|
140
|
+
retval = {}
|
|
141
|
+
# generate list of stageout methods we will try
|
|
142
|
+
stageOutMethods = [self.defaultMethod]
|
|
143
|
+
stageOutMethods.extend(self.fallbacks)
|
|
144
|
+
|
|
145
|
+
# loop over all the different methods. This unifies regular and fallback stuff. Nice.
|
|
146
|
+
methodCounter = 0
|
|
147
|
+
for currentMethod in stageOutMethods:
|
|
148
|
+
methodCounter += 1
|
|
149
|
+
(pnn, command, options, pfn, protocol) = \
|
|
150
|
+
self.getTransferDetails(lfn, currentMethod)
|
|
151
|
+
|
|
152
|
+
retval = {'LFN': lfn,
|
|
153
|
+
'PFN': pfn,
|
|
154
|
+
'PNN': pnn}
|
|
155
|
+
|
|
156
|
+
log.info("Attempting deletion method %s" % (methodCounter,))
|
|
157
|
+
log.info("Current method information: %s" % currentMethod)
|
|
158
|
+
|
|
159
|
+
try:
|
|
160
|
+
deleteSlave = retrieveStageOutImpl(command, useNewVersion=True)
|
|
161
|
+
except RegistryError:
|
|
162
|
+
deleteSlave = retrieveStageOutImpl(command, useNewVersion=False)
|
|
163
|
+
logging.error("Tried to load stageout backend %s, a new version isn't there yet" % command)
|
|
164
|
+
logging.error("Will try to fall back to the oldone, but it's really best to redo it")
|
|
165
|
+
logging.error("Here goes...")
|
|
166
|
+
deleteSlave.removeFile(pfn)
|
|
167
|
+
return retval
|
|
168
|
+
|
|
169
|
+
# do the delete. The implementation is responsible for its own verification
|
|
170
|
+
try:
|
|
171
|
+
deleteSlave.doDelete(pfn, pnn, command, options, protocol)
|
|
172
|
+
except StageOutError as ex:
|
|
173
|
+
log.info("Delete failed in an expected manner. Exception is:")
|
|
174
|
+
log.info("%s" % str(ex))
|
|
175
|
+
log.info(traceback.format_exc())
|
|
176
|
+
if not self.firstException:
|
|
177
|
+
self.firstException = ex
|
|
178
|
+
continue
|
|
179
|
+
# note to people who think it's cheeky to catch exception after ranting against it:
|
|
180
|
+
# this makes sense because no matter what the exception, we want to keep going
|
|
181
|
+
# additionally, it prints out the proper backtrace so we can diagnose issues
|
|
182
|
+
# AMM - 6/30/2010
|
|
183
|
+
except Exception as ex:
|
|
184
|
+
log.critical("Delete failed in an unexpected manner. Exception is:")
|
|
185
|
+
log.critical("%s" % str(ex))
|
|
186
|
+
log.info(traceback.format_exc())
|
|
187
|
+
if not self.firstException:
|
|
188
|
+
self.firstException = ex
|
|
189
|
+
continue
|
|
190
|
+
|
|
191
|
+
# successful deletions make it here
|
|
192
|
+
return retval
|
|
193
|
+
|
|
194
|
+
# unseuccessful transfers make it here
|
|
195
|
+
if self.firstException:
|
|
196
|
+
raise self.firstException
|
|
197
|
+
else:
|
|
198
|
+
raise StageOutFailure("Could not delete", **retval)
|
|
199
|
+
|
|
200
|
+
def initialiseSiteConf(self):
|
|
201
|
+
"""
|
|
202
|
+
_initialiseSiteConf_
|
|
203
|
+
|
|
204
|
+
Extract required information from site conf and TFC
|
|
205
|
+
|
|
206
|
+
"""
|
|
207
|
+
implName = pnn = catalog = option = None
|
|
208
|
+
try:
|
|
209
|
+
implName = self.siteCfg.localStageOut.get("command")
|
|
210
|
+
pnn = self.siteCfg.localStageOut.get("phedex-node")
|
|
211
|
+
catalog = self.siteCfg.localStageOut.get("catalog")
|
|
212
|
+
option = self.siteCfg.localStageOut.get('option', None)
|
|
213
|
+
|
|
214
|
+
except Exception:
|
|
215
|
+
log.critical('Either command, phedex-node or the catalog are missing from site-local-config.xml')
|
|
216
|
+
log.critical('File operations cannot proceed like this')
|
|
217
|
+
log.critical('command: %s phedex-node: %s catalog: %s' % (implName, pnn, catalog))
|
|
218
|
+
raise
|
|
219
|
+
try:
|
|
220
|
+
self.tfc = self.siteCfg.trivialFileCatalog()
|
|
221
|
+
except Exception:
|
|
222
|
+
log.critical("TFC wasn't loaded, file operations cannot proceed")
|
|
223
|
+
raise
|
|
224
|
+
|
|
225
|
+
self.fallbacks = self.siteCfg.fallbackStageOut
|
|
226
|
+
self.defaultMethod = {'command': implName,
|
|
227
|
+
'phedex-node': pnn,
|
|
228
|
+
'catalog': catalog}
|
|
229
|
+
if option:
|
|
230
|
+
self.defaultMethod['option'] = option
|
|
231
|
+
|
|
232
|
+
log.info("Local Stage Out Implementation to be used is: %s" % implName)
|
|
233
|
+
log.info("Local Stage Out PNN to be used is %s" % pnn)
|
|
234
|
+
log.info("Local Stage Out Catalog to be used is %s" % catalog)
|
|
235
|
+
log.info("Trivial File Catalog has been loaded:\n%s" % str(self.tfc))
|
|
236
|
+
log.info("There are %s fallback stage out definitions" % len(self.fallbacks))
|
|
237
|
+
for item in self.fallbacks:
|
|
238
|
+
log.info("Fallback to : %s using: %s " % (item['phedex-node'], item['command']))
|
|
239
|
+
|
|
240
|
+
def initialiseOverride(self):
|
|
241
|
+
"""
|
|
242
|
+
_initialiseOverride_
|
|
243
|
+
|
|
244
|
+
Extract required information from override.
|
|
245
|
+
|
|
246
|
+
TODO: this should be merged with the initializeSiteConf function
|
|
247
|
+
but I can't think of a nice way to do it
|
|
248
|
+
|
|
249
|
+
"""
|
|
250
|
+
implName = pnn = lfn_prefix = None
|
|
251
|
+
option = ""
|
|
252
|
+
try:
|
|
253
|
+
implName = self.overrideConf["command"]
|
|
254
|
+
pnn = self.overrideConf["phedex-node"]
|
|
255
|
+
lfn_prefix = self.overrideConf["lfn-prefix"]
|
|
256
|
+
|
|
257
|
+
except Exception:
|
|
258
|
+
log.critical('Either command, phedex-node, or the lfn-prefix are missing from the override')
|
|
259
|
+
log.critical('File operations cannot proceed like this')
|
|
260
|
+
log.critical('command: %s phedex-node: %s lfn-prefix: %s' % (implName, pnn, lfn_prefix))
|
|
261
|
+
raise
|
|
262
|
+
|
|
263
|
+
self.fallbacks = []
|
|
264
|
+
self.defaultMethod = {'command': implName,
|
|
265
|
+
'phedex-node': pnn,
|
|
266
|
+
'lfn-prefix': lfn_prefix}
|
|
267
|
+
if option:
|
|
268
|
+
self.defaultMethod['option'] = option
|
|
269
|
+
|
|
270
|
+
log.info("Note: We have been directed to use a StageOut override")
|
|
271
|
+
log.info("Local Stage Out Implementation to be used is: %s" % implName)
|
|
272
|
+
log.info("Local Stage Out PNN to be used is %s" % pnn)
|
|
273
|
+
log.info("Local Stage Out lfn-prefix to be used is %s" % lfn_prefix)
|
|
274
|
+
|
|
275
|
+
def getTransferDetails(self, lfn, currentMethod):
|
|
276
|
+
"""
|
|
277
|
+
helper procedure to return the proper parameters to interact with the filesystem
|
|
278
|
+
regardless of whether or not there's an override involved
|
|
279
|
+
"""
|
|
280
|
+
|
|
281
|
+
if 'lfn-prefix' in currentMethod:
|
|
282
|
+
pnn = currentMethod['phedex-node']
|
|
283
|
+
command = currentMethod['command']
|
|
284
|
+
options = currentMethod.get('option', None)
|
|
285
|
+
pfn = "%s%s" % (currentMethod['lfn-prefix'], lfn)
|
|
286
|
+
protocol = command
|
|
287
|
+
else:
|
|
288
|
+
pnn = self.siteCfg.localStageOut['phedex-node']
|
|
289
|
+
command = self.siteCfg.localStageOut['command']
|
|
290
|
+
options = self.siteCfg.localStageOut.get('option', None)
|
|
291
|
+
pfn = self.searchTFC(lfn)
|
|
292
|
+
protocol = self.tfc.preferredProtocol
|
|
293
|
+
return pnn, command, options, pfn, protocol
|
|
294
|
+
|
|
295
|
+
def stageIn(self, fileToStage):
|
|
296
|
+
return self.stageFile(fileToStage, stageOut=False)
|
|
297
|
+
|
|
298
|
+
def stageOut(self, fileToStage):
|
|
299
|
+
return self.stageFile(fileToStage, stageOut=True)
|
|
300
|
+
|
|
301
|
+
def _doTransfer(self, currentMethod, methodCounter, localFileName, pfn, stageOut):
|
|
302
|
+
"""
|
|
303
|
+
performs a transfer using a selected method and retries.
|
|
304
|
+
necessary because python doesn't have a good nested loop break syntax
|
|
305
|
+
"""
|
|
306
|
+
|
|
307
|
+
(pnn, command, options, _, protocol) = \
|
|
308
|
+
self.getTransferDetails(localFileName, currentMethod)
|
|
309
|
+
|
|
310
|
+
# Swap directions if we're staging in
|
|
311
|
+
if not stageOut:
|
|
312
|
+
tempPfn = pfn
|
|
313
|
+
pfn = localFileName
|
|
314
|
+
localFileName = tempPfn
|
|
315
|
+
|
|
316
|
+
for retryNumber in range(self.numberOfRetries + 1):
|
|
317
|
+
log.info("Attempting transfer method %s, Retry number: %s" % (methodCounter, retryNumber))
|
|
318
|
+
log.info("Current method information: %s" % currentMethod)
|
|
319
|
+
|
|
320
|
+
try:
|
|
321
|
+
stageOutSlave = retrieveStageOutImpl(command, useNewVersion=True, stagein=not stageOut)
|
|
322
|
+
except RegistryError:
|
|
323
|
+
stageOutSlave = retrieveStageOutImpl(command, useNewVersion=False, stagein=not stageOut)
|
|
324
|
+
logging.error("Tried to load stageout backend %s, a new version isn't there yet" % command)
|
|
325
|
+
logging.error("Will try to fall back to the oldone, but it's really best to redo it")
|
|
326
|
+
logging.error("Here goes...")
|
|
327
|
+
stageOutSlave(protocol, localFileName, pfn, options)
|
|
328
|
+
return pfn
|
|
329
|
+
|
|
330
|
+
# do the copy. The implementation is responsible for its own verification
|
|
331
|
+
newPfn = None
|
|
332
|
+
try:
|
|
333
|
+
# FIXME add checksum stuff
|
|
334
|
+
newPfn = stageOutSlave.doTransfer(localFileName, pfn, stageOut, pnn, command, options, protocol, None)
|
|
335
|
+
except StageOutError as ex:
|
|
336
|
+
log.info("Transfer failed in an expected manner. Exception is:")
|
|
337
|
+
log.info("%s" % str(ex))
|
|
338
|
+
log.info("Sleeping for %s seconds" % self.retryPauseTime)
|
|
339
|
+
log.info(traceback.format_exc())
|
|
340
|
+
time.sleep(self.retryPauseTime)
|
|
341
|
+
if not self.firstException:
|
|
342
|
+
self.firstException = ex
|
|
343
|
+
continue
|
|
344
|
+
# note to people who think it's cheeky to catch exception after ranting against it:
|
|
345
|
+
# this makes sense because no matter what the exception, we want to keep going
|
|
346
|
+
# additionally, it prints out the proper backtrace so we can diagnose issues
|
|
347
|
+
# AMM - 6/30/2010
|
|
348
|
+
except Exception as ex:
|
|
349
|
+
log.critical("Transfer failed in an unexpected manner. Exception is:")
|
|
350
|
+
log.critical("%s" % str(ex))
|
|
351
|
+
log.critical("Since this is an unexpected error, we are continuing to the next method")
|
|
352
|
+
log.critical("and not retrying the same one")
|
|
353
|
+
log.critical(traceback.format_exc())
|
|
354
|
+
if not self.firstException:
|
|
355
|
+
self.firstException = ex
|
|
356
|
+
break
|
|
357
|
+
|
|
358
|
+
# successful transfers make it here
|
|
359
|
+
return newPfn
|
|
360
|
+
# unseuccessful transfers make it here
|
|
361
|
+
return False
|
|
362
|
+
|
|
363
|
+
def cleanSuccessfulStageOuts(self):
|
|
364
|
+
"""
|
|
365
|
+
_cleanSucessfulStageOuts_
|
|
366
|
+
|
|
367
|
+
In the event of a failed stage out, this method can be called to cleanup the
|
|
368
|
+
files that may have previously been staged out so that the job ends in a clear state
|
|
369
|
+
of failure, rather than a partial success
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
"""
|
|
373
|
+
for lfn in self.completedFiles:
|
|
374
|
+
log.info("Cleaning out file: %s\n" % lfn)
|
|
375
|
+
try:
|
|
376
|
+
self.deleteLFN(lfn)
|
|
377
|
+
except StageOutFailure as ex:
|
|
378
|
+
log.info("Failed to cleanup staged out file after error:")
|
|
379
|
+
log.info(" %s\n%s" % (lfn, str(ex)))
|
|
380
|
+
log.info(traceback.format_exc())
|
|
381
|
+
|
|
382
|
+
def searchTFC(self, lfn):
|
|
383
|
+
"""
|
|
384
|
+
_searchTFC_
|
|
385
|
+
|
|
386
|
+
Search the Trivial File Catalog for the lfn provided,
|
|
387
|
+
if a match is made, return the matched PFN
|
|
388
|
+
|
|
389
|
+
"""
|
|
390
|
+
if self.tfc is None:
|
|
391
|
+
log.info("Trivial File Catalog not available to match LFN:")
|
|
392
|
+
log.info(lfn)
|
|
393
|
+
return None
|
|
394
|
+
if self.tfc.preferredProtocol is None:
|
|
395
|
+
log.info("Trivial File Catalog does not have a preferred protocol")
|
|
396
|
+
log.info("which prevents local stage out for:")
|
|
397
|
+
log.info(lfn)
|
|
398
|
+
return None
|
|
399
|
+
|
|
400
|
+
pfn = self.tfc.matchLFN(self.tfc.preferredProtocol, lfn)
|
|
401
|
+
if pfn is None:
|
|
402
|
+
log.info("Unable to map LFN to PFN:")
|
|
403
|
+
log.info("LFN: %s" % lfn)
|
|
404
|
+
return None
|
|
405
|
+
|
|
406
|
+
log.info("LFN to PFN match made:")
|
|
407
|
+
log.info("LFN: %s\nPFN: %s\n" % (lfn, pfn))
|
|
408
|
+
return pfn
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
# wrapper classes for compatibility
|
|
412
|
+
class StageInMgr(FileManager):
|
|
413
|
+
def __init__(self, numberOfRetries=30, retryPauseTime=60, **overrideParams):
|
|
414
|
+
FileManager.__init__(self, numberOfRetries=numberOfRetries, retryPauseTime=retryPauseTime, **overrideParams)
|
|
415
|
+
|
|
416
|
+
def __call__(self, fileToStage):
|
|
417
|
+
"""
|
|
418
|
+
stages in a file, fileToStage is a dict with at least the LFN key
|
|
419
|
+
the dict will be modified and returned, or an exception will be raised
|
|
420
|
+
"""
|
|
421
|
+
return self.stageIn(fileToStage)
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
class StageOutMgr(FileManager):
|
|
425
|
+
def __init__(self, numberOfRetries=30, retryPauseTime=60, **overrideParams):
|
|
426
|
+
FileManager.__init__(self, numberOfRetries=numberOfRetries, retryPauseTime=retryPauseTime, **overrideParams)
|
|
427
|
+
|
|
428
|
+
def __call__(self, fileToStage):
|
|
429
|
+
"""
|
|
430
|
+
stages out a file, fileToStage is a dict with at least the LFN key
|
|
431
|
+
the dict will be modified and returned, or an exception will be raised
|
|
432
|
+
"""
|
|
433
|
+
log.info("StageOutMgr called with file: %s" % fileToStage)
|
|
434
|
+
return self.stageOut(fileToStage)
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
class DeleteMgr(FileManager):
|
|
438
|
+
def __init__(self, numberOfRetries=30, retryPauseTime=60, **overrideParams):
|
|
439
|
+
FileManager.__init__(self, numberOfRetries=numberOfRetries, retryPauseTime=retryPauseTime, **overrideParams)
|
|
440
|
+
|
|
441
|
+
def __call__(self, fileToDelete):
|
|
442
|
+
"""
|
|
443
|
+
stages out a file, fileToStage is a dict with at least the LFN key
|
|
444
|
+
the dict will be modified and returned, or an exception will be raised
|
|
445
|
+
"""
|
|
446
|
+
if 'LFN' not in fileToDelete:
|
|
447
|
+
raise StageOutFailure('LFN not provided to deleteLFN')
|
|
448
|
+
return self.deleteLFN(fileToDelete['LFN'])
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""
|
|
3
|
+
_CPImpl_
|
|
4
|
+
|
|
5
|
+
Implementation of StageOutImpl interface for plain cp
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
from __future__ import division
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
import errno
|
|
12
|
+
import shutil
|
|
13
|
+
|
|
14
|
+
from WMCore.Storage.StageOutImplV2 import StageOutImplV2
|
|
15
|
+
from WMCore.Storage.StageOutError import StageOutFailure
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class CPImpl(StageOutImplV2):
|
|
19
|
+
"""
|
|
20
|
+
_CPImpl_
|
|
21
|
+
|
|
22
|
+
Implement interface for plain cp command
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
def createOutputDirectory(self, targetPFN):
|
|
27
|
+
targetdir = os.path.dirname(targetPFN)
|
|
28
|
+
if not os.path.isdir(targetdir):
|
|
29
|
+
try:
|
|
30
|
+
os.makedirs(targetdir)
|
|
31
|
+
except OSError as exc:
|
|
32
|
+
if exc.errno != errno.EEXIST:
|
|
33
|
+
raise
|
|
34
|
+
return
|
|
35
|
+
|
|
36
|
+
def doTransfer(self, fromPfn, toPfn, stageOut, pnn, command, options, protocol, checksum ):
|
|
37
|
+
self.createOutputDirectory(toPfn)
|
|
38
|
+
shutil.copy(fromPfn, toPfn)
|
|
39
|
+
if os.path.getsize(fromPfn) != os.path.getsize(toPfn):
|
|
40
|
+
raise StageOutFailure("Invalid file size")
|
|
41
|
+
return toPfn
|
|
42
|
+
|
|
43
|
+
def doDelete(self, pfn, pnn, command, options, protocol):
|
|
44
|
+
os.remove(pfn)
|
|
45
|
+
return
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""
|
|
3
|
+
_SRMV2Impl_
|
|
4
|
+
|
|
5
|
+
Implementation of StageOutImpl interface for SRM Version 2
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
from builtins import zip, range
|
|
9
|
+
|
|
10
|
+
import os, re
|
|
11
|
+
import logging, tempfile
|
|
12
|
+
import subprocess
|
|
13
|
+
from subprocess import Popen, PIPE
|
|
14
|
+
|
|
15
|
+
from WMCore.Storage.StageOutImplV2 import StageOutImplV2
|
|
16
|
+
from WMCore.Storage.StageOutError import StageOutError, StageOutFailure
|
|
17
|
+
|
|
18
|
+
from WMCore.Storage.Execute import runCommandWithOutput as runCommand
|
|
19
|
+
|
|
20
|
+
_CheckExitCodeOption = True
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class SRMV2Impl(StageOutImplV2):
|
|
25
|
+
"""
|
|
26
|
+
_SRMV2Impl_
|
|
27
|
+
|
|
28
|
+
Implement interface for srmcp v2 command
|
|
29
|
+
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
run = staticmethod(runCommand)
|
|
33
|
+
|
|
34
|
+
def __init__(self):
|
|
35
|
+
StageOutImplV2.__init__(self)
|
|
36
|
+
self.directoryErrorCodes = (1,)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def createSourceName(self, protocol, pfn):
|
|
40
|
+
"""
|
|
41
|
+
_createSourceName_
|
|
42
|
+
|
|
43
|
+
SRM uses file:/// urls
|
|
44
|
+
|
|
45
|
+
"""
|
|
46
|
+
if pfn.startswith('/'):
|
|
47
|
+
return "file:///%s" % pfn
|
|
48
|
+
elif os.path.isfile(pfn):
|
|
49
|
+
return "file:///%s" % os.path.abspath(pfn)
|
|
50
|
+
else:
|
|
51
|
+
return pfn
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def createOutputDirectory(self, targetPFN, stageOut):
|
|
55
|
+
"""
|
|
56
|
+
_createOutputDirectory_
|
|
57
|
+
|
|
58
|
+
SRMV2 does not create directories,
|
|
59
|
+
see http://sdm.lbl.gov/srm-wg/doc/SRM.v2.2.html#_Toc199734394
|
|
60
|
+
|
|
61
|
+
"""
|
|
62
|
+
targetdir = os.path.dirname(targetPFN)
|
|
63
|
+
|
|
64
|
+
if not stageOut:
|
|
65
|
+
# stage in to local directory - should exist but you never know
|
|
66
|
+
if not os.path.exists(targetdir):
|
|
67
|
+
os.makedirs(targetdir)
|
|
68
|
+
return
|
|
69
|
+
|
|
70
|
+
# // Loop from top level checking existence stop when directory exists
|
|
71
|
+
# // assume first 4 slashes are from srm://host:8443/srm/managerv2?SFN=
|
|
72
|
+
dirs = ["/".join(targetdir.split("/")[0:6+i]) \
|
|
73
|
+
for i in range(targetdir.count("/")-4)]
|
|
74
|
+
dirsToCheck = dirs[:]; dirsToCheck.reverse()
|
|
75
|
+
levelToCreateFrom = len(dirs)
|
|
76
|
+
# the -1 in the zip is because we assume that /store is there
|
|
77
|
+
for count, dir in zip(range(len(dirsToCheck), 0, -1), dirsToCheck):
|
|
78
|
+
_, output = self.runCommandWarnOnError(['srmls',\
|
|
79
|
+
'-recursion_depth=0',\
|
|
80
|
+
'-retry_num=%s'\
|
|
81
|
+
% self.numRetries,\
|
|
82
|
+
dir])
|
|
83
|
+
levelToCreateFrom = count # create dirs from here (at least)
|
|
84
|
+
if not output.count('SRM_FAILURE'): # any other codes?
|
|
85
|
+
break
|
|
86
|
+
|
|
87
|
+
# // Create needed directory levels from end of previous loop
|
|
88
|
+
# // to end of directory structure
|
|
89
|
+
for dir in dirs[levelToCreateFrom - 1:]:
|
|
90
|
+
#print "Create directory: %s" % dir
|
|
91
|
+
self.runCommandWarnOnError(['srmmkdir',
|
|
92
|
+
'-retry_num=%s' % self.numRetries,
|
|
93
|
+
dir])
|
|
94
|
+
|
|
95
|
+
def doDelete(self, pfn, pnn, command, options, protocol ):
|
|
96
|
+
"""
|
|
97
|
+
handle both srm and file pfn types
|
|
98
|
+
"""
|
|
99
|
+
if pfn.startswith("srm://"):
|
|
100
|
+
self.runCommandWarnOnNonZero(["srmrm", 'pfn'])
|
|
101
|
+
elif pfn.startswith("file:"):
|
|
102
|
+
self.runCommandWarnOnNonZero(["/bin/rm", "-f", pfn.replace("file://", "", 1)])
|
|
103
|
+
elif pfn.startswith('/'):
|
|
104
|
+
self.runCommandWarnOnNonZero(["/bin/rm", "-f", pfn])
|
|
105
|
+
elif os.path.isfile(pfn):
|
|
106
|
+
self.runCommandWarnOnNonZero(["/bin/rm", "-f", os.path.abspath(pfn)])
|
|
107
|
+
else:
|
|
108
|
+
logging.info("Tried to delete, but nothing knew how")
|
|
109
|
+
logging.info("pfn: %s" % pfn)
|
|
110
|
+
|
|
111
|
+
def doTransfer(self, fromPfn, toPfn, stageOut, pnn, command, options, protocol, checksum ):
|
|
112
|
+
toPfn = self.createSourceName(protocol, toPfn)
|
|
113
|
+
fromPfn = self.createSourceName(protocol, fromPfn)
|
|
114
|
+
# TODO tee the output to another file
|
|
115
|
+
# attempt copy
|
|
116
|
+
for x in range(self.numRetries):
|
|
117
|
+
(_,reportFile) = tempfile.mkstemp()
|
|
118
|
+
ourCommand = \
|
|
119
|
+
self.generateCommandFromPreAndPostParts(\
|
|
120
|
+
['srmcp','-2','-report=%s'%reportFile,
|
|
121
|
+
'-retry_num=0'],
|
|
122
|
+
[fromPfn, toPfn],
|
|
123
|
+
options)
|
|
124
|
+
self.runCommandWarnOnNonZero(ourCommand)
|
|
125
|
+
|
|
126
|
+
if not stageOut:
|
|
127
|
+
remotePFN, localPFN = fromPfn, toPfn.replace("file://", "", 1)
|
|
128
|
+
else:
|
|
129
|
+
remotePFN, localPFN = toPfn, fromPfn.replace("file://", "", 1)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
if _CheckExitCodeOption:
|
|
133
|
+
p1 = Popen(["cat", reportFile], stdout=PIPE)
|
|
134
|
+
p3 = Popen(['cut','-f3','-d',' '], stdin=p1.stdout, stdout=PIPE)
|
|
135
|
+
exitCode = p3.communicate()[0].rstrip()
|
|
136
|
+
logging.info("srmcp exit status: %s" % exitCode)
|
|
137
|
+
p2 = Popen(['grep', '-c', 'SRM_INVALID_PATH',reportFile],stdout=PIPE)
|
|
138
|
+
invalidPathCount = p2.communicate()[0]
|
|
139
|
+
logging.info("got this for SRM_INVALID_PATH: %s" % invalidPathCount)
|
|
140
|
+
if (invalidPathCount and (exitCode == '')):
|
|
141
|
+
logging.warning("Directory doesn't exist in srmv2 stageout...creating and retrying")
|
|
142
|
+
self.createOutputDirectory(toPfn,stageOut)
|
|
143
|
+
continue
|
|
144
|
+
elif ( str(exitCode) != "0" ):
|
|
145
|
+
logging.error("Couldn't stage out! Error code: %s" % exitCode)
|
|
146
|
+
self.doDelete(toPfn,None,None,None,None)
|
|
147
|
+
raise StageOutFailure("srmcp failed! Error code: %s" % exitCode)
|
|
148
|
+
else:
|
|
149
|
+
logging.info("Tentatively succeeded transfer, will check metadata")
|
|
150
|
+
break
|
|
151
|
+
|
|
152
|
+
localSize = os.path.getsize( localPFN )
|
|
153
|
+
logging.info("Local Size %s" % localSize)
|
|
154
|
+
|
|
155
|
+
remotePath = None
|
|
156
|
+
SFN = '?SFN='
|
|
157
|
+
sfn_idx = remotePFN.find(SFN)
|
|
158
|
+
if sfn_idx >= 0:
|
|
159
|
+
remotePath = remotePFN[sfn_idx+5:]
|
|
160
|
+
r = re.compile('srm://([A-Za-z\-\.0-9]*)(:[0-9]*)?(/.*)')
|
|
161
|
+
m = r.match(remotePFN)
|
|
162
|
+
if not m:
|
|
163
|
+
raise StageOutError("Unable to determine path from PFN for " \
|
|
164
|
+
"target %s." % remotePFN)
|
|
165
|
+
if remotePath == None:
|
|
166
|
+
remotePath = m.groups()[2]
|
|
167
|
+
remoteHost = m.groups()[0]
|
|
168
|
+
# filesize() { `srm-get-metadata -retry_num=0 %s 2>/dev/null | grep 'size :[0-9]' | cut -f2 -d":"`}
|
|
169
|
+
# the following replaces the above
|
|
170
|
+
logging.info("remote path: %s" % remotePath)
|
|
171
|
+
logging.info("remote host: %s" % remoteHost)
|
|
172
|
+
p1 = Popen(["srmls", '-recursion_depth=0','-retry_num=0', remotePFN], stdout=PIPE)
|
|
173
|
+
p2 = Popen(["grep", remotePath], stdout=PIPE, stdin=p1.stdout)
|
|
174
|
+
p3 = Popen(["grep", '-v', remoteHost], stdout=PIPE, stdin=p2.stdout)
|
|
175
|
+
p4 = Popen(["awk", "{print $1;}"], stdout=PIPE,stdin=p3.stdout)
|
|
176
|
+
remoteSize = p4.communicate()[0]
|
|
177
|
+
logging.info("Localsize: %s Remotesize: %s" % (localSize, remoteSize))
|
|
178
|
+
if int(localSize) != int(remoteSize):
|
|
179
|
+
try:
|
|
180
|
+
self.doDelete(toPfn,None,None,None,None)
|
|
181
|
+
except:
|
|
182
|
+
pass
|
|
183
|
+
raise StageOutFailure("File sizes don't match")
|
|
184
|
+
|
|
185
|
+
return toPfn
|
|
186
|
+
|
|
187
|
+
def runCommandWarnOnError(self,command):
|
|
188
|
+
return SRMV2Impl.runCommandWarnOnError(self, command)
|