Skip to content

Commit

Permalink
passing options to wm, dqm gui or server
Browse files Browse the repository at this point in the history
  • Loading branch information
vlimant committed May 16, 2013
1 parent a30cac6 commit bbedc1e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
20 changes: 16 additions & 4 deletions Configuration/PyReleaseValidation/python/MatrixInjector.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,29 @@ def upload_to_couch_oneArg(arguments):

class MatrixInjector(object):

def __init__(self,opt,mode='init'):
def __init__(self,opt,mode='init',options=''):
self.count=1040

self.dqmgui=None
self.wmagent=None
for k in options.split(','):
if k.startswith('dqm:'):
self.dqmgui=k.split(':',1)[-1]
elif k.startswith('wma:'):
self.wmagent=k.split(':',1)[-1]

self.testMode=((mode!='submit') and (mode!='force'))
self.version =1
self.keep = opt.keep

#wagemt stuff
self.wmagent=os.getenv('WMAGENT_REQMGR')
if not self.wmagent:
self.wmagent=os.getenv('WMAGENT_REQMGR')
if not self.wmagent:
self.wmagent = 'cmsweb.cern.ch'


if not self.dqmgui:
self.dqmgui="https://cmsweb.cern.ch/dqm/relval"
#couch stuff
self.couch = 'https://'+self.wmagent+'/couchdb'
# self.couchDB = 'reqmgr_config_cache'
Expand Down Expand Up @@ -95,7 +107,7 @@ def __init__(self,opt,mode='init'):

self.defaultHarvest={
"EnableDQMHarvest" : 1,
"DQMUploadUrl" : "https://cmsweb.cern.ch/dqm/relval",
"DQMUploadUrl" : self.dqmgui,
"DQMConfigCacheID" : None
}

Expand Down
6 changes: 5 additions & 1 deletion Configuration/PyReleaseValidation/scripts/runTheMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def runSelected(opt):
if ret!=0:
print 'Cannot go on with wmagent injection with failing workflows'
else:
wfInjector = MatrixInjector(opt,mode=opt.wmcontrol)
wfInjector = MatrixInjector(opt,mode=opt.wmcontrol,options=opt.wmoptions)
ret= wfInjector.prepare(mrd,
mRunnerHi.runDirs)
if ret==0:
Expand Down Expand Up @@ -132,6 +132,10 @@ def runSelected(opt):
dest='wmcontrol',
default=None,
)
parser.add_option('--optionswm',
help='Specify a few things for wm injection',
default='',
dest='wmoptions')
parser.add_option('--keep',
help='allow to specify for which coma separated steps the output is needed',
default=None)
Expand Down

0 comments on commit bbedc1e

Please sign in to comment.