acdcserver 2.3.5rc3__tar.gz → 2.3.6__tar.gz

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.
Files changed (173) hide show
  1. {acdcserver-2.3.5rc3/src/python/acdcserver.egg-info → acdcserver-2.3.6}/PKG-INFO +1 -1
  2. acdcserver-2.3.6/bin/docker.sh +84 -0
  3. acdcserver-2.3.6/bin/patchComponent.sh +74 -0
  4. acdcserver-2.3.6/bin/wmagent-component-standalone +241 -0
  5. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/ExecuteDAO.py +73 -38
  6. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/__init__.py +1 -1
  7. {acdcserver-2.3.5rc3 → acdcserver-2.3.6/src/python/acdcserver.egg-info}/PKG-INFO +1 -1
  8. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/acdcserver.egg-info/SOURCES.txt +2 -0
  9. acdcserver-2.3.5rc3/bin/patchComponent.sh +0 -28
  10. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/LICENSE +0 -0
  11. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/MANIFEST.in +0 -0
  12. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/NOTICE +0 -0
  13. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/README.md +0 -0
  14. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/HWMon/wmcore-SysStat +0 -0
  15. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/acdcserver-tools +0 -0
  16. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/ParseSpecCmsswdist.py +0 -0
  17. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/adjustMongoDocs.py +0 -0
  18. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/checkDsetFileCount.py +0 -0
  19. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/checkStuckLQE.py +0 -0
  20. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/createPileupObjects.py +0 -0
  21. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/drainAgent.py +0 -0
  22. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/fixWorkflowParentage.py +0 -0
  23. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/getWQStatusByWorkflow.py +0 -0
  24. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/injectUnified.py +0 -0
  25. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/mongoInit.py +0 -0
  26. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/parseUnifiedCampaigns.py +0 -0
  27. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/setrequeststatus.py +0 -0
  28. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/summaryWMStatsFailures.py +0 -0
  29. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/updatePileupObjects.py +0 -0
  30. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/updateTotalStats.py +0 -0
  31. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/adhoc-scripts/workflowCompletion.py +0 -0
  32. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/attempt-to-patch.sh +0 -0
  33. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/buildrelease.sh +0 -0
  34. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/check-ACDC-parentage +0 -0
  35. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/check-phedex-dbs-status +0 -0
  36. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/check-request-wq-status +0 -0
  37. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/clean-oracle +0 -0
  38. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/combineMinifyWMStats.py +0 -0
  39. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/couch-thrash.py +0 -0
  40. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/couch_archiver.py +0 -0
  41. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/create-iam-token.sh +0 -0
  42. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/createStoreResults.py +0 -0
  43. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/dbsbuffer-file-fix.py +0 -0
  44. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/deploy-rpm-to-jenkins.sh +0 -0
  45. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/fix-dbs-parentage +0 -0
  46. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/inject-to-config-cache +0 -0
  47. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/kill-workflow-in-agent +0 -0
  48. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/kill-workflow-in-global +0 -0
  49. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/make-local-clones.sh +0 -0
  50. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/outputmodules-from-config +0 -0
  51. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/paused-jobs +0 -0
  52. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/purgeDeletedCouchDoc.py +0 -0
  53. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/reqmgr-put-default-config +0 -0
  54. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/reqmgr-sw-update +0 -0
  55. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/vaildateCMSSWMergeVersion +0 -0
  56. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmagent-couchapp-init +0 -0
  57. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmagent-delete-couchdb-workflow +0 -0
  58. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmagent-mod-config +0 -0
  59. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmagent-resource-control +0 -0
  60. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmagent-unregister-wmstats +0 -0
  61. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmagent-upload-config +0 -0
  62. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmagent-workqueue +0 -0
  63. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmc-dist-patch +0 -0
  64. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmc-dist-unpatch +0 -0
  65. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmc-httpd +0 -0
  66. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmcore-db-init +0 -0
  67. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmcore-new-config +0 -0
  68. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmcore-new-flow +0 -0
  69. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/bin/wmcoreD +0 -0
  70. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/requirements.txt +0 -0
  71. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/setup.cfg +0 -0
  72. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/setup.py +0 -0
  73. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/setup_build.py +0 -0
  74. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/setup_dependencies.py +0 -0
  75. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/_attachments/CouchDBLogo.png +0 -0
  76. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/_attachments/DMWMLogo.png +0 -0
  77. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/_attachments/collections.html +0 -0
  78. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/_attachments/displaycollection.html +0 -0
  79. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/_attachments/index.html +0 -0
  80. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/_attachments/style/main.css +0 -0
  81. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/_id +0 -0
  82. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/couchapp.json +0 -0
  83. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/filters/filterDeletedDocs.js +0 -0
  84. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/rewrites.json +0 -0
  85. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/validate_doc_update.js +0 -0
  86. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/vendor/acdc/_attachments/acdc.js +0 -0
  87. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/views/byCollectionName/map.js +0 -0
  88. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/views/byCollectionName/reduce.js +0 -0
  89. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/views/byTimestamp/map.js +0 -0
  90. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/views/coll_fileset_count/map.js +0 -0
  91. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/views/coll_fileset_count/reduce.js +0 -0
  92. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/views/coll_fileset_docs/map.js +0 -0
  93. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/ACDC/views/coll_fileset_docs/reduce.js +0 -0
  94. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/.couchappignore +0 -0
  95. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/.couchapprc +0 -0
  96. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/_attachments/index.html +0 -0
  97. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/_attachments/style/main.css +0 -0
  98. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/_id +0 -0
  99. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/couchapp.json +0 -0
  100. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/updates/newgroup.js +0 -0
  101. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/updates/newuser.js +0 -0
  102. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/updates/ownthis.js +0 -0
  103. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/vendor/couchapp/README.md +0 -0
  104. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/vendor/couchapp/_attachments/jquery.couchapp.js +0 -0
  105. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/vendor/couchapp/couchapp.js +0 -0
  106. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/vendor/couchapp/date.js +0 -0
  107. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/vendor/couchapp/metadata.json +0 -0
  108. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/vendor/couchapp/path.js +0 -0
  109. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/vendor/couchapp/template.js +0 -0
  110. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/vendor/groupuser/_attachments/groupuser.js +0 -0
  111. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/views/group_members/map.js +0 -0
  112. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/views/groups/map.js +0 -0
  113. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/views/name_map/map.js +0 -0
  114. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/views/owner_group_user/map.js +0 -0
  115. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/couchapps/GroupUser/views/users/map.js +0 -0
  116. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/ACDC/Collection.py +0 -0
  117. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/ACDC/CollectionTypes.py +0 -0
  118. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/ACDC/CouchCollection.py +0 -0
  119. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/ACDC/CouchFileset.py +0 -0
  120. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/ACDC/CouchService.py +0 -0
  121. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/ACDC/DataCollectionService.py +0 -0
  122. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/ACDC/Fileset.py +0 -0
  123. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/ACDC/__init__.py +0 -0
  124. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Algorithms/ParseXMLFile.py +0 -0
  125. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Algorithms/Permissions.py +0 -0
  126. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Algorithms/__init__.py +0 -0
  127. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Configuration.py +0 -0
  128. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/File.py +0 -0
  129. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/Fileset.py +0 -0
  130. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/Job.py +0 -0
  131. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/JobGroup.py +0 -0
  132. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/JobPackage.py +0 -0
  133. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/LumiList.py +0 -0
  134. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/Mask.py +0 -0
  135. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/Pickleable.py +0 -0
  136. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/Run.py +0 -0
  137. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/Subscription.py +0 -0
  138. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/WMObject.py +0 -0
  139. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/WorkUnit.py +0 -0
  140. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/Workflow.py +0 -0
  141. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/DataStructs/__init__.py +0 -0
  142. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/CMSCouch.py +0 -0
  143. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/ConfigDBMap.py +0 -0
  144. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/CouchUtils.py +0 -0
  145. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/DBCore.py +0 -0
  146. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/DBCreator.py +0 -0
  147. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/DBExceptionHandler.py +0 -0
  148. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/DBFactory.py +0 -0
  149. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/DBFormatter.py +0 -0
  150. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/Dialects.py +0 -0
  151. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/MongoDB.py +0 -0
  152. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/MySQLCore.py +0 -0
  153. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/ResultSet.py +0 -0
  154. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/Transaction.py +0 -0
  155. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/__init__.py +0 -0
  156. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Database/ipy_profile_couch.py +0 -0
  157. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/GroupUser/CouchObject.py +0 -0
  158. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/GroupUser/Decorators.py +0 -0
  159. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/GroupUser/Group.py +0 -0
  160. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/GroupUser/Interface.py +0 -0
  161. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/GroupUser/User.py +0 -0
  162. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/GroupUser/__init__.py +0 -0
  163. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Lexicon.py +0 -0
  164. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Services/Requests.py +0 -0
  165. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Services/__init__.py +0 -0
  166. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Services/pycurl_manager.py +0 -0
  167. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/WMException.py +0 -0
  168. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Wrappers/JsonWrapper/JSONThunker.py +0 -0
  169. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Wrappers/JsonWrapper/__init__.py +0 -0
  170. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/WMCore/Wrappers/__init__.py +0 -0
  171. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/acdcserver.egg-info/dependency_links.txt +0 -0
  172. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/acdcserver.egg-info/requires.txt +0 -0
  173. {acdcserver-2.3.5rc3 → acdcserver-2.3.6}/src/python/acdcserver.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: acdcserver
3
- Version: 2.3.5rc3
3
+ Version: 2.3.6
4
4
  Summary: UNKNOWN
5
5
  Home-page: https://github.com/dmwm/WMCore
6
6
  Maintainer: CMS DMWM Group
@@ -0,0 +1,84 @@
1
+ #!/bin/bash
2
+ # Author: Valentin Kuznetsov <vkuznet@gmail.com>
3
+ # helper script to handle docker actions
4
+
5
+ if [ $# -ne 4 ]; then
6
+ echo "Usage: docker.sh <action> <service> <tag> <registry> "
7
+ echo "Supported actions: build, push"
8
+ exit 1;
9
+ fi
10
+
11
+ # helper function to match the pattern X.Y.Z where X, Y, and Z are numbers
12
+ function match_tag {
13
+ local tag=$1
14
+ if [[ $tag =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
15
+ return 0
16
+ elif [[ $tag =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
17
+ return 0
18
+ else
19
+ return 1
20
+ fi
21
+ }
22
+
23
+ # make input variable assignments
24
+ action=$1
25
+ service=$2
26
+ tag=$3
27
+ registry=$4
28
+ rurl=$registry/cmsweb/$service
29
+
30
+ # check if action is supported
31
+ case "$action" in
32
+ "build"|"push")
33
+ ;;
34
+ *)
35
+ echo "action: '$action' is not supported"
36
+ exit 1
37
+ ;;
38
+ esac
39
+
40
+ # determine suffix of image tag
41
+ suffix=""
42
+ if match_tag "$tag"; then
43
+ suffix="-stable"
44
+ fi
45
+
46
+ # check build/push actions and build the image(s) if it will be required
47
+ if [ "$action" == "build" ]; then
48
+ echo "action: docker build --build-arg TAG=${tag} --tag ${rurl}:${tag}"
49
+ docker build --build-arg TAG=${tag} --tag ${rurl}:${tag} .
50
+ docker images | grep $tag | grep $service
51
+
52
+ if [ -z "$suffix" ]; then
53
+ echo "Building stable image for tag=$tag is not appropriate as tag is not matched X.Y.Z or X.Y.Z.P pattern"
54
+ exit 0
55
+ fi
56
+
57
+ echo "action: docker build --build-arg TAG=${tag} --tag ${rurl}:${tag}${suffix}"
58
+ docker build --build-arg TAG=${tag} --tag ${rurl}:${tag}${suffix} .
59
+ docker images | grep ${tag}${suffix} | grep $service
60
+ fi
61
+
62
+ if [ "$action" == "push" ]; then
63
+ image_exist=$(docker images | grep $tag | grep $service | grep -v ${tag}-stable)
64
+ echo $image_exist
65
+
66
+ if [ -z "$image_exist" ]; then
67
+ echo "Images ${rurl}:${tag} not found"
68
+ exit 1
69
+ fi
70
+ echo "action: docker push ${rurl}:${tag}"
71
+ docker push ${rurl}:${tag}
72
+
73
+ # now push the stable release
74
+ if [ -n "$suffix" ]; then
75
+ image_exist_stable=$(docker images | grep ${tag}${suffix} | grep $service)
76
+ echo $image_exist_stable
77
+ if [ -z "$image_exist_stable" ]; then
78
+ echo "Images ${rurl}:${tag}${suffix} not found"
79
+ exit 2
80
+ fi
81
+ echo "action: docker push ${rurl}:${tag}${suffix}"
82
+ docker push ${rurl}:${tag}${suffix}
83
+ fi
84
+ fi
@@ -0,0 +1,74 @@
1
+ #!/bin/bash
2
+
3
+ usage()
4
+ {
5
+ echo -ne "\nA simple script to facilitate component patching\n"
6
+ echo -ne "and to decrease the development && testing turnaround time.\n"
7
+ echo -ne "Usage: \n"
8
+ echo -ne "\t sudo ./patchComponent.sh 11270\n"
9
+ echo -ne "\t git diff --no-color | sudo ./patchComponent.sh \n or:\n"
10
+ echo -ne "\t curl https://patch-diff.githubusercontent.com/raw/dmwm/WMCore/pull/11270.patch | sudo ./patchComponent.sh \n"
11
+ exit 1
12
+ }
13
+
14
+ # if fd 0 (stdin) is open and refers to a terminal - then we are running the script directly, without a pipe
15
+ # if fd 0 (stdin) is open but does not refer to the terminal - then we are running the script through a pipe
16
+ if [ -t 0 ] ; then pipe=false; else pipe=true ; fi
17
+
18
+ patchNum=$1
19
+ shift
20
+
21
+ [[ -z $patchNum ]] && patchNum=temp
22
+ echo "Patching WMCore code with PR: $patchNum"
23
+
24
+ currTag=$(python -c "from WMCore import __version__ as WMCoreVersion; print(WMCoreVersion)")
25
+ echo "Current WMCoreTag: $currTag"
26
+
27
+
28
+ # Find all possible locations for the component source
29
+ # NOTE: We always consider PYTHONPATH first
30
+ pythonLibPaths=$(echo $PYTHONPATH |sed -e "s/\:/ /g")
31
+ pythonLibPaths="$pythonLibPaths $(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")"
32
+
33
+ for path in $pythonLibPaths
34
+ do
35
+ [[ -d $path/WMCore ]] && { pythonLibPath=$path; echo "Source code found at: $path"; break ;}
36
+ done
37
+
38
+ [[ -z $pythonLibPath ]] && { echo "ERROR: Could not find WMCore source to patch"; exit 1 ;}
39
+ echo "Current PythonLibPath: $pythonLibPath"
40
+
41
+ stripLevel=3
42
+ patchFile=/tmp/$patchNum.patch
43
+
44
+ patchCmd="patch -t --verbose -b --version-control=numbered -d $pythonLibPath -p$stripLevel"
45
+
46
+
47
+ if $pipe
48
+ then
49
+ # if we run through a pipeline create the temporary patch file for later parsing
50
+ echo "Creating a temporary patchFile at: $patchFile"
51
+ cat <&0 > $patchFile
52
+ else
53
+ echo "Downloading a temporary patchFile at: $patchFile"
54
+ curl https://patch-diff.githubusercontent.com/raw/dmwm/WMCore/pull/$patchNum.patch -o $patchFile
55
+ fi
56
+
57
+
58
+ echo "Refreshing all files which are to be patched from the origin"
59
+ for file in `grep diff $patchFile |grep "a/src/python" |awk '{print $3}' |sort |uniq`
60
+ do
61
+ file=${file#a\/src\/python\/}
62
+ echo orig: https://raw.githubusercontent.com/dmwm/WMCore/$currTag/src/python/$file
63
+ echo dest: $pythonLibPath/$file
64
+ curl -f https://raw.githubusercontent.com/dmwm/WMCore/$currTag/src/python/$file -o $pythonLibPath/$file || { \
65
+ echo file: $file missing at the origin.
66
+ echo Seems to be a new file for the current patch.
67
+ echo Removing it from the destination as well!
68
+ rm -f $pythonLibPath/$file
69
+ }
70
+ done
71
+
72
+ echo "Patching all files starting from the original version"
73
+ echo "cat $patchFile | $patchCmd"
74
+ cat $patchFile | $patchCmd
@@ -0,0 +1,241 @@
1
+ #!/usr/bin/env python
2
+ """
3
+ wmagent-component-standalone
4
+
5
+ Utility script for running a WMAgent component standalone.
6
+
7
+ Example usage:
8
+
9
+ interactive mode:
10
+ ipython -i $WMA_DEPLOY_DIR/bin/wmagent-component-standalone -- -c $WMA_CONFIG_FILE -p JobAccountant -e $WMA_ENV_FILE
11
+
12
+ daemon mode:
13
+ wmagent-component-standalone -c $WMA_CONFIG_FILE -p JobAccountant -e $WMA_ENV_FILE
14
+ """
15
+
16
+ import os
17
+ import sys
18
+ import logging
19
+ import importlib
20
+ import runpy
21
+ import pkgutil
22
+ import inspect
23
+ import subprocess
24
+ from pprint import pprint,pformat
25
+ from distutils.sysconfig import get_python_lib
26
+ from argparse import ArgumentParser, RawDescriptionHelpFormatter
27
+ from WMCore.Configuration import loadConfigurationFile
28
+ from WMCore.ResourceControl.ResourceControl import ResourceControl
29
+ from WMCore.Services.CRIC.CRIC import CRIC
30
+ from WMCore.WMInit import connectToDB
31
+ from Utils.FileTools import loadEnvFile
32
+
33
+ def createOptionParser():
34
+ """
35
+ _createOptionParser_
36
+
37
+ Creates an option parser to setup the component run parameters
38
+ """
39
+ exampleStr = """
40
+ Examples:
41
+
42
+ * interactive mode:
43
+ ipython -i $WMA_DEPLOY_DIR/bin/wmagent-component-standalone -- -c $WMA_CONFIG_FILE -p JobAccountant -e $WMA_ENV_FILE
44
+
45
+ * daemon mode:
46
+ wmagent-component-standalone -c $WMA_CONFIG_FILE -p JobAccountant -e $WMA_ENV_FILE
47
+ """
48
+ helpStr = """
49
+ Utility script for running a WMAgent component standalone. It supports two modes:
50
+ * interactive - it loads all possible sub modules defined within the component's source area
51
+ and tries to create a proper set of object instances for each of them
52
+ in the global scope of the script, such that they could be used interactively
53
+ * daemon - it mimics the normal behavior of a regular component run in the background,
54
+ while at the same time giving the ability to overwrite some of the component's configuration parameters
55
+ e.g. loglevel or provide an alternative WMA_CONFIG_FILE and/or WMA_ENV_FILE.
56
+ """
57
+ optParser = ArgumentParser(formatter_class=RawDescriptionHelpFormatter,
58
+ description=helpStr,
59
+ epilog=exampleStr)
60
+ optParser.add_argument("-c", "--config", dest="wmaConfigPath", help="WMAgent configuration file.",
61
+ default=os.environ.get("WMA_CONFIG_FILE", None))
62
+ optParser.add_argument("-e", "--envfile", dest="wmaEnvFilePath", help="WMAgent environment file.",
63
+ default=os.environ.get("WMA_ENV_FILE", None))
64
+ optParser.add_argument("-d", "--daemon", dest="daemon",
65
+ default=False, action="store_true",
66
+ help="The component would be run as a daemon, similar to how it is run through the standard agent manage scripts.")
67
+ optParser.add_argument("-p", "--component", dest="wmaComponentName",
68
+ default=None,
69
+ help="The component/package to be loaded.")
70
+ optParser.add_argument("-l", "--loglevel", dest="logLevel",
71
+ default='INFO',
72
+ help="The loglevel at which the component should be run,")
73
+
74
+ return optParser
75
+
76
+
77
+ def main():
78
+ """
79
+ _main_
80
+ The main function to be used for starting the chosen component as a daemon
81
+ """
82
+ # NOTE: There are two methods for running the wmcore daemon
83
+ # * The first method forks and assosiates a new shell to the running process
84
+ # os.system(f"wmcoreD --start --component {wmaComponentName}")
85
+ # * The second method executes the daemon in the very same interpretter:
86
+ # runpy("wmcoreD")
87
+
88
+ wmaDaemonPath = os.environ.get("WMA_DEPLOY_DIR", None) + "/bin/wmcoreD"
89
+
90
+ # Run the daemon:
91
+ logger.info("Starting the component daemon")
92
+ sys.argv = ["--", "--restart", "--component", wmaComponentName]
93
+ runpy.run_path(wmaDaemonPath)
94
+
95
+ return
96
+
97
+ if __name__ == '__main__':
98
+ optParser = createOptionParser()
99
+ (options, args) = optParser.parse_known_args()
100
+ FORMAT = "%(asctime)s:%(levelname)s:%(module)s:%(funcName)s(): %(message)s"
101
+ LOGLEVEL = logging.INFO
102
+ # add logfile handler as well:
103
+ logFilePath = os.path.join(os.getenv('WMA_INSTALL_DIR', '/tmp'), f'{options.wmaComponentName}/ComponentLogStandalone')
104
+ logFileHandler = logging.FileHandler(logFilePath)
105
+ logStdoutHandler = logging.StreamHandler(sys.stdout)
106
+
107
+ logging.basicConfig(handlers=[logStdoutHandler, logFileHandler], format=FORMAT, level=LOGLEVEL)
108
+ logger = logging.getLogger(__name__)
109
+ # logger.setLevel(LOGLEVEL)
110
+
111
+ # sourcing $WMA_ENV_FILE explicitely
112
+ if not options.wmaEnvFilePath or not os.path.exists(options.wmaEnvFilePath):
113
+ msg = "Missing WMAgent environment file! One may expect component misbehaviour!"
114
+ logger.warning(msg)
115
+ else:
116
+ msg = "Trying to source explicitely the WMAgent environment file: %s"
117
+ logger.info(msg, options.wmaEnvFilePath)
118
+ try:
119
+ loadEnvFile(options.wmaEnvFilePath)
120
+ except Exception as ex:
121
+ logger.error("Failed to load wmaEnvFile: %s", options.wmaEnvFilePath)
122
+ raise
123
+
124
+ # checking the existence of wmaConfig file
125
+ if not options.wmaConfigPath or not os.path.exists(options.wmaConfigPath):
126
+ msg = "Missing WMAgent config file! One may expect component failure"
127
+ logger.warning(msg)
128
+ else:
129
+ # resetting the configuration in the env (if the default is overwritten through args)
130
+ os.environ['WMAGENT_CONFIG'] = options.wmaConfigPath
131
+ os.environ['WMA_CONFIG_FILE'] = options.wmaConfigPath
132
+
133
+ wmaConfig = loadConfigurationFile(options.wmaConfigPath)
134
+ logger.info(f"wmaEnvFilePath: {options.wmaEnvFilePath}")
135
+ logger.info(f"wmaConfigPath: {options.wmaConfigPath}")
136
+ logger.info(f"wmaComponent: {options.wmaComponentName}")
137
+ logger.info(f"logLevel: {options.logLevel}")
138
+ logger.info(f"daemon: {options.daemon}")
139
+
140
+ connectToDB()
141
+
142
+ logger.info(f"Creating default component objects.")
143
+ resourceControl = ResourceControl(config=wmaConfig)
144
+ wmaComponentName = options.wmaComponentName
145
+ wmaComponentModule = f"WMComponent.{wmaComponentName}"
146
+ # wmaComponent = importlib.import_module(wmaComponentModule + "." + wmaComponentName)
147
+
148
+ logger.info("Importing all possible modules found for this component")
149
+
150
+ # First find all possible locations for the component source
151
+ # NOTE: We always consider PYTHONPATH first
152
+ pythonLibPaths = os.getenv('PYTHONPATH', '').split(':')
153
+ pythonLibPaths.append(get_python_lib())
154
+ # Normalize paths and remove empty ones
155
+ pythonLibPaths = [x for x in pythonLibPaths if x]
156
+ for index, libPath in enumerate(pythonLibPaths):
157
+ pythonLibPaths[index] = os.path.normpath(libPath)
158
+
159
+ wmaComponentPaths = []
160
+ for comPath in pythonLibPaths:
161
+ comPath = f"{comPath}/WMComponent/{wmaComponentName}"
162
+ comPath = os.path.normpath(comPath)
163
+ if os.path.exists(comPath):
164
+ wmaComponentPaths.append(comPath)
165
+
166
+ modules = {}
167
+ classDefs = {}
168
+ # Then try to load all possible modules and submodules under the component's source path
169
+ # for pkgSource, pkgName, _ in pkgutil.iter_modules(wmaComponentPaths):
170
+ for pkgSource, pkgName, _ in pkgutil.walk_packages(wmaComponentPaths):
171
+ fullPkgName = f"{wmaComponentModule}.{pkgName}"
172
+ if pkgName == "DefaultConfig":
173
+ continue
174
+ logger.info("Loading package: %s", fullPkgName)
175
+ modSpec = pkgSource.find_spec(fullPkgName)
176
+ module = importlib.util.module_from_spec(modSpec)
177
+ modSpec.loader.exec_module(module)
178
+ modules[pkgName] = module
179
+
180
+ # Emulating `from module import *`"
181
+ logger.info(f"Populating the namespace with all definitions from {pkgName}")
182
+ if "__all__" in module.__dict__:
183
+ names = module.__dict__["__all__"]
184
+ else:
185
+ names = [x for x in module.__dict__ if not x.startswith("_")]
186
+ globals().update({k: getattr(module, k) for k in names})
187
+
188
+ # Creating instances only for class definitions local to pkgName
189
+
190
+ # Note: The method bellow for separating local definitions from imported ones
191
+ # won't work for decorated classes, since the module name of the
192
+ # decorated class defintion is considered to be the fully qulified
193
+ # module name/path of the decorator rather than the package where the
194
+ # the class definition exists:
195
+ # e.g.:
196
+ # In [10]: modules['DataCollectAPI'].__name__
197
+ # Out[10]: 'WMComponent.AnalyticsDataCollector.DataCollectAPI'
198
+ #
199
+ # In [11]: classDefs['DataCollectAPI']['LocalCouchDBData']
200
+ # Out[11]: WMComponent.AnalyticsDataCollector.DataCollectorEmulatorSwitch.emulatorHook.<locals>.EmulatorWrapper
201
+ #
202
+ # In [12]: classDefs['DataCollectAPI']['LocalCouchDBData'].__name__
203
+ # Out[12]: 'EmulatorWrapper'
204
+ #
205
+ # In [13]: classDefs['DataCollectAPI']['LocalCouchDBData'].__module__
206
+ # Out[13]: 'WMComponent.AnalyticsDataCollector.DataCollectorEmulatorSwitch'
207
+ #
208
+ # In [14]: modules['DataCollectAPI'].__name__
209
+ # Out[14]: 'WMComponent.AnalyticsDataCollector.DataCollectAPI'
210
+
211
+ logger.info("Trying to create an instance of all class definitions inside: %s", pkgName)
212
+ classDefs[pkgName] = {}
213
+ for objName, obj in inspect.getmembers(module):
214
+ if inspect.isclass(obj) and obj.__module__ == modules[pkgName].__name__:
215
+ classDefs[pkgName][objName]=obj
216
+
217
+ for className in classDefs[pkgName]:
218
+ logger.info(f"{fullPkgName}:{className}")
219
+ try:
220
+ exec(f"{className.lower()} = {className}()")
221
+ except TypeError:
222
+ try:
223
+ exec(f"{className.lower()} = {className}(wmaConfig)")
224
+ except TypeError:
225
+ try:
226
+ exec(f"{className.lower()} = {className}(wmaConfig, logger=logger)")
227
+ except TypeError:
228
+ logger.warning(f"We did our best to create an instance of: {pkgName}. Giving up now!")
229
+
230
+ def modReload():
231
+ for module in modules:
232
+ modName = modules[module].__name__
233
+ modInst = sys.modules.get(modName)
234
+ if modInst:
235
+ logger.info(f"Reloading module:{modName}")
236
+ importlib.reload(modInst)
237
+ else:
238
+ logger.warning(f"Cannot find module: {modName} in sys.modules")
239
+
240
+ if options.daemon:
241
+ main()
@@ -24,16 +24,17 @@ Usage:
24
24
  import sys
25
25
  import os
26
26
  import re
27
- import ast
27
+
28
28
  import threading
29
29
  import logging
30
30
  import argparse
31
+ import pickle
31
32
  from pprint import pformat
32
33
 
33
34
  from WMCore.DAOFactory import DAOFactory
34
35
  from WMCore.WMInit import WMInit
35
36
  from WMCore.Agent.Configuration import Configuration, loadConfigurationFile
36
-
37
+ from Utils.FileTools import loadEnvFile
37
38
 
38
39
  def parseArgs():
39
40
  """
@@ -44,11 +45,18 @@ def parseArgs():
44
45
  formatter_class=argparse.RawTextHelpFormatter,
45
46
  description=__doc__)
46
47
 
47
- parser.add_argument('-c', '--config', required=True,
48
+ parser.add_argument('-c', '--config', required=False,
49
+ default=os.environ.get("WMA_CONFIG_FILE", None),
48
50
  help="""\
49
- The path to WMAGENT_CONFIG to be used, e.g.
50
- for production: /data/srv/wmagent/current/config/wmagent/config.py
51
- for tier0: /data/tier0/srv/wmagent/current/config/tier0/config.py""")
51
+ The WMAgent config file to be used for the this execution. Default is taken from
52
+ the current's shell environment variable $WMA_CONFIG_FILE
53
+ """)
54
+ parser.add_argument('-e', '--envFile', required=False,
55
+ default=os.environ.get("WMA_ENV_FILE", None),
56
+ help="""
57
+ The WMAgent environment file to be used for the this execution. Default is taken from
58
+ the current's shell environment variable $WMA_ENV_FILE
59
+ """)
52
60
  parser.add_argument('-p', '--package', required=True,
53
61
  help="""\
54
62
  The package from which the DAO factory to be created for this execution, e.g. WMCore.WMBS or WMComponent.DBS3Buffer""")
@@ -70,25 +78,32 @@ def parseArgs():
70
78
  parser.add_argument('sqlArgs', nargs=argparse.REMAINDER, default=(),
71
79
  help="""\
72
80
  -- Positional parameters to be forwarded to the DAO execute method and used as SQL arguments in the query.""")
81
+ parser.add_argument('-f', '--pklFile', default=None,
82
+ help="""\
83
+ An extra *.pkl file containing any additional python objects needed for the given dao
84
+ e.g. WMCore.WMBS.Files.AddRunLumi.
85
+ The object is always loaded under the name `pklFile`. One can access the contents of the so loaded pkl file
86
+ during the dao execution trough the -s arguent e.g.:
87
+ ExecuteDAO.py -p WMCore.WMBS -m Files.AddRunLumi -c $WMA_CONFIG_FILE -f runLumiBinds_2035-4016.pkl -s "{'file': pklFile['data']}
88
+ """)
89
+ currArgs = parser.parse_args()
73
90
 
74
- args = parser.parse_args()
75
-
76
- return args
91
+ return currArgs
77
92
 
78
93
 
79
94
  def loggerSetup(logLevel=logging.INFO):
80
95
  """
81
96
  Return a logger which writes everything to stdout.
82
97
  """
83
- logger = logging.getLogger()
98
+ currLogger = logging.getLogger()
84
99
  outHandler = logging.StreamHandler(sys.stdout)
85
100
  outHandler.setFormatter(logging.Formatter("%(asctime)s:%(levelname)s:%(module)s: %(message)s"))
86
101
  outHandler.setLevel(logLevel)
87
- if logger.handlers:
88
- logger.handlers.clear()
89
- logger.addHandler(outHandler)
90
- logger.setLevel(logLevel)
91
- return logger
102
+ if currLogger.handlers:
103
+ currLogger.handlers.clear()
104
+ currLogger.addHandler(outHandler)
105
+ currLogger.setLevel(logLevel)
106
+ return currLogger
92
107
 
93
108
 
94
109
  def getBackendFromDbURL(dburl):
@@ -110,15 +125,12 @@ class ExecuteDAO():
110
125
  """
111
126
  A generic class to create the DAO Factory and execute the DAO module.
112
127
  """
113
- def __init__(self, logger=None, configFile=None,
114
- connectUrl=None, socket=None,
115
- package=None, daoModule=None):
128
+ def __init__(self, connectUrl=None, socket=None, configFile=None,
129
+ package=None, daoModule=None, logger=None):
116
130
  """
117
131
  __init__
118
132
  The ExecuteDAO constructor method.
119
- :param logger: The logger instance.
120
133
  :param package: The Package from which the DAO factory to be initialised.
121
- :param configFile: Path to WMAgent configuration file.
122
134
  :param connectUrl: Database connection URL (overwrites the connectUrl param from configFile if both present)
123
135
  :param socket: Database connection URL (overwrites the socket param from configFile if both present)
124
136
  :param module: The DAO module to be executed.
@@ -215,7 +227,13 @@ class ExecuteDAO():
215
227
  self.logger.info("DAO SQL arguments provided:\n%s, %s", pformat(sqlArgs), pformat(sqlKwArgs))
216
228
  else:
217
229
  results = self.dao.execute(*sqlArgs, **sqlKwArgs)
218
- self.logger.info("DAO Results:\n%s", pformat(results if isinstance(results, dict) else list(results)))
230
+ # self.logger.info("DAO Results:\n%s", pformat(results if isinstance(results, dict) else list(results)))
231
+ if isinstance(results, dict):
232
+ self.logger.info("DAO Results:\n%s", pformat(results))
233
+ elif isinstance(results, bool):
234
+ self.logger.info("DAO Results:\n%s", results)
235
+ else:
236
+ self.logger.info("DAO Results:\n%s", list(results))
219
237
  return results
220
238
 
221
239
  def getSqlQuery(self):
@@ -244,21 +262,19 @@ def strToDict(dString, logger=None):
244
262
  :param dString: The dictionary string to be parsed. Possible formats are either a string
245
263
  of multiple space separated named values of the form 'name=value':
246
264
  or a srting fully defining the dictionary itself.
247
- :param logger: A logger object to be used for Error message printout
248
265
  :return: The constructed dictionary
249
266
  """
250
- logger = logger or logging.getLogger()
251
- result = ast.literal_eval(dString)
267
+ if not logger:
268
+ logger = logging.getLogger()
269
+ # result = ast.literal_eval(dString)
270
+ result = eval(dString)
252
271
  if not isinstance(result, dict):
253
272
  logger.error("The Query named arguments need to be provided as a dictionary. WRONG option: %s", pformat(dString))
254
273
  raise TypeError(pformat(dString))
255
274
  return result
256
275
 
257
276
 
258
- def main():
259
- """
260
- An Utility to construct a DAO Factory and execute the DAO requested.
261
- """
277
+ if __name__ == '__main__':
262
278
  args = parseArgs()
263
279
 
264
280
  if args.debug:
@@ -266,6 +282,17 @@ def main():
266
282
  else:
267
283
  logger = loggerSetup()
268
284
 
285
+ # Create an instance of the *.pkl file provided with the dao call, if any.
286
+ if args.pklFile:
287
+ pklFilePath = os.path.normpath(args.pklFile)
288
+ if not os.path.exists(pklFilePath):
289
+ logger.error("Cannot find the pkl file: %s. Exit!", pklFilePath)
290
+ sys.exit(1)
291
+ with open(pklFilePath, 'rb') as fd:
292
+ pklFile = pickle.load(fd)
293
+ logger.info('PklFile: %s loaded as: `pklFile`. You can refer to its content through the -s argument.', pklFilePath)
294
+ # logger.info(pformat(pklFile))
295
+
269
296
  # Remove leading double slash if present:
270
297
  if args.sqlArgs and args.sqlArgs[0] == '--':
271
298
  args.sqlArgs = args.sqlArgs[1:]
@@ -276,17 +303,25 @@ def main():
276
303
 
277
304
  # Parse named arguments to a proper dictionary:
278
305
  if not isinstance(args.sqlKwArgs, dict):
279
- args.sqlKwArgs = strToDict(args.sqlKwArgs, logger=logger)
306
+ args.sqlKwArgs = strToDict(args.sqlKwArgs)
280
307
 
281
- # Try to set the wmagent configuration in the environment
282
- if 'WMAGENT_CONFIG' not in os.environ:
308
+ # Trying to load WMA_ENV_FILE
309
+ if not args.envFile or not os.path.exists(args.envFile):
310
+ logger.warning("Missing WMAgent environment file! One may expect DAO misbehavior!")
311
+ else:
312
+ logger.info("Trying to source explicitely the WMAgent environment file: %s", args.envFile)
313
+ try:
314
+ loadEnvFile(args.envFile)
315
+ except Exception as ex:
316
+ logger.error("Failed to load wmaEnvFile: %s", args.envFile)
317
+ raise
318
+
319
+ if not args.config or not os.path.exists(args.config):
320
+ logger.warning("Missing WMAgent config file! One may expect DAO failure")
321
+ else:
322
+ # resetting the configuration file in the env (if the default is overwritten through args)
283
323
  os.environ['WMAGENT_CONFIG'] = args.config
284
- configFile = os.environ['WMAGENT_CONFIG']
324
+ os.environ['WMA_CONFIG_FILE'] = args.config
285
325
 
286
- daoObject = ExecuteDAO(logger=logger, configFile=configFile,
287
- package=args.package, daoModule=args.module)
326
+ daoObject = ExecuteDAO(package=args.package, daoModule=args.module, configFile=args.config)
288
327
  daoObject(*args.sqlArgs, dryRun=args.dryRun, daoHelp=True, **args.sqlKwArgs)
289
-
290
-
291
- if __name__ == '__main__':
292
- main()
@@ -6,5 +6,5 @@ Core libraries for Workload Management Packages
6
6
 
7
7
  """
8
8
 
9
- __version__ = '2.3.5rc3'
9
+ __version__ = '2.3.6'
10
10
  __all__ = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: acdcserver
3
- Version: 2.3.5rc3
3
+ Version: 2.3.6
4
4
  Summary: UNKNOWN
5
5
  Home-page: https://github.com/dmwm/WMCore
6
6
  Maintainer: CMS DMWM Group
@@ -21,6 +21,7 @@ bin/create-iam-token.sh
21
21
  bin/createStoreResults.py
22
22
  bin/dbsbuffer-file-fix.py
23
23
  bin/deploy-rpm-to-jenkins.sh
24
+ bin/docker.sh
24
25
  bin/fix-dbs-parentage
25
26
  bin/inject-to-config-cache
26
27
  bin/kill-workflow-in-agent
@@ -33,6 +34,7 @@ bin/purgeDeletedCouchDoc.py
33
34
  bin/reqmgr-put-default-config
34
35
  bin/reqmgr-sw-update
35
36
  bin/vaildateCMSSWMergeVersion
37
+ bin/wmagent-component-standalone
36
38
  bin/wmagent-couchapp-init
37
39
  bin/wmagent-delete-couchdb-workflow
38
40
  bin/wmagent-mod-config
@@ -1,28 +0,0 @@
1
- #!/bin/bash
2
-
3
- usage()
4
- {
5
- echo -ne "\nA simple script to facilitate component patching\n"
6
- echo -ne "and to decrease the development && testing turnaround time.\n"
7
- echo -ne "Usage: \n"
8
- echo -ne "\t git diff --no-color | sudo ./patchComponent.sh (wmagent | reqmon | reqmgr2 | reqmgr2ms...)\n or:\n"
9
- echo -ne "\t curl https://patch-diff.githubusercontent.com/raw/dmwm/WMCore/pull/11270.patch | sudo ./patchComponent.sh (wmagent | reqmon | reqmgr2 | reqmgr2ms...)\n"
10
- exit 1
11
- }
12
-
13
- # TODO: To check against a list of components
14
- component=$1
15
- [[ -z $component ]] && usage
16
-
17
- echo "Patching component: $component"
18
-
19
- if [[ $component == "wmagent" ]]
20
- then
21
- rootDir=/data/srv/$component/current/apps.sw/$component/lib/python*/site-packages
22
- else
23
- rootDir=/data/srv/current/apps.sw/$component/lib/python*/site-packages/
24
- fi
25
-
26
- stripLevel=3
27
-
28
- patch --verbose -b --version-control=numbered -d $rootDir -p$stripLevel
File without changes
File without changes
File without changes
File without changes