Commit 43953712 authored by Andrea Sciaba's avatar Andrea Sciaba
Browse files

Removed dependency on PhEDEx services

parent 413744b6
......@@ -358,7 +358,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
def metricAllLHCb(self):
return self.metricAll('AllLHCb')
def metricGetPFNFromTFC(self, testLFN="/store/unmerged/SAM/testSRM"):
def oldmetricGetPFNFromTFC(self, testLFN="/store/unmerged/SAM/testSRM"):
"""Get full SRM endpoint(s) and storage areas from PhEDEx DataService.
"""
......@@ -528,6 +528,185 @@ class SRMVOMetrics(probe.MetricGatherer) :
return ('OK', "Got PFN and Space Token from PhEDEx DataService")
def metricGetPFNFromTFC(self, testLFN="/store/unmerged/SAM/testSRM"):
"""Get full SRM endpoint(s) and storage areas from PhEDEx DataService.
"""
try:
self.__workdir_lock()
except IOError as e:
self.printd('Failed to lock. %s' % str(e))
return 'UNKNOWN', 'UNKNOWN: Failed to lock working directory.'
PFNTable = { 'srm-cms.cern.ch': "srm://srm-cms.cern.ch:8443/srm/managerv2?SFN=/castor/cern.ch/cms/store/unmerged/SAM/testSRM/SAM-srm-cms.cern.ch/lcg-util",
'eoscmsftp.cern.ch': "gsiftp://eoscmsftp.cern.ch//eos/cms/store/unmerged/SAM/testSRM/SAM-eoscmsftp.cern.ch/lcg-util",
'cmssrm-kit.gridka.de': "srm://cmssrm-kit.gridka.de:8443/srm/managerv2?SFN=/pnfs/gridka.de/cms/disk-only/store/unmerged/SAM/testSRM/SAM-cmssrm-kit.gridka.de/lcg-util",
'srmcms.pic.es': "srm://srmcms.pic.es:8443/srm/managerv2?SFN=/pnfs/pic.es/data/cms/disk/store/unmerged/SAM/testSRM/SAM-srmcms.pic.es/lcg-util",
'ccsrm.in2p3.fr': "srm://ccsrm.in2p3.fr:8443/srm/managerv2?SFN=/pnfs/in2p3.fr/data/cms/prod/store/unmerged/SAM/testSRM/SAM-ccsrm.in2p3.fr/lcg-util",
'storm-fe-cms.cr.cnaf.infn.it': "srm://storm-fe-cms.cr.cnaf.infn.it:8444/srm/managerv2?SFN=/cmstape/store/unmerged/SAM/testSRM/SAM-storm-fe-cms.cr.cnaf.infn.it/lcg-util",
'srm-cms.jinr-t1.ru': "srm://srm-cms.jinr-t1.ru:8443/srm/managerv2?SFN=/pnfs/jinr-t1.ru/data/cms/store/unmerged/SAM/testSRM/SAM-srm-cms.jinr-t1.ru/lcg-util",
'srm-cms-mss.jinr-t1.ru': "srm://srm-cms-mss.jinr-t1.ru:8443/srm/managerv2?SFN=/pnfs/jinr-t1.ru/data/cms/store/unmerged/SAM/testSRM/SAM-srm-cms-mss.jinr-t1.ru/lcg-util",
'gridftp.echo.stfc.ac.uk': "gsiftp://gridftp.echo.stfc.ac.uk/cms:/store/unmerged/SAM/testSRM/SAM-gridftp.echo.stfc.ac.uk/lcg-util",
'srm-cms.gridpp.rl.ac.uk': "srm://srm-cms.gridpp.rl.ac.uk:8443/srm/managerv2?SFN=/castor/ads.rl.ac.uk/prod/cms/store/unmerged/SAM/testSRM/SAM-srm-cms.gridpp.rl.ac.uk/lcg-util",
'cmsdcatape.fnal.gov': "srm://cmsdcatape.fnal.gov:8443/srm/managerv2?SFN=/11/store/unmerged/SAM/testSRM/SAM-cmsdcatape.fnal.gov/lcg-util",
'cmsdcadisk.fnal.gov': "srm://cmsdcadisk.fnal.gov:8443/srm/managerv2?SFN=/dcache/uscmsdisk/store/unmerged/SAM/testSRM/SAM-cmsdcadisk.fnal.gov/lcg-util",
'se.grid.vbc.ac.at': "gsiftp://se.grid.vbc.ac.at:2811//eos/vbc/experiments/cms/store/unmerged/SAM/testSRM/SAM-se.grid.vbc.ac.at/lcg-util",
'maite.iihe.ac.be': "srm://maite.iihe.ac.be:8443/srm/managerv2?SFN=/pnfs/iihe/cms/ph/sc4/store/unmerged/SAM/testSRM/SAM-maite.iihe.ac.be/lcg-util",
'ingrid-se02.cism.ucl.ac.be': "srm://ingrid-se02.cism.ucl.ac.be:8444/srm/managerv2?SFN=/storage/data/cms/store/unmerged/SAM/testSRM/SAM-ingrid-se02.cism.ucl.ac.be/lcg-util",
'osg-se.sprace.org.br': "srm://osg-se.sprace.org.br:8443/srm/managerv2?SFN=/pnfs/sprace.org.br/data/cms/store/unmerged/SAM/testSRM/SAM-osg-se.sprace.org.br/lcg-util",
'gridftp.hepgrid.uerj.br': "gsiftp://gridftp.hepgrid.uerj.br//mnt/hadoop/cms//store/unmerged/SAM/testSRM/SAM-gridftp.hepgrid.uerj.br/lcg-util",
'eoscmsftp.cern.ch': "gsiftp://eoscmsftp.cern.ch//eos/cms/store/unmerged/SAM/testSRM/SAM-eoscmsftp.cern.ch/lcg-util",
'storage01.lcg.cscs.ch': "srm://storage01.lcg.cscs.ch:8443/srm/managerv2?SFN=/pnfs/lcg.cscs.ch/cms/trivcat/store/unmerged/SAM/testSRM/SAM-storage01.lcg.cscs.ch/lcg-util",
'srm.ihep.ac.cn': "srm://srm.ihep.ac.cn:8443/srm/managerv2?SFN=/pnfs/ihep.ac.cn/data/cms/store/unmerged/SAM/testSRM/SAM-srm.ihep.ac.cn/lcg-util",
'dcache-se-cms.desy.de': "srm://dcache-se-cms.desy.de:8443/srm/managerv2?SFN=/pnfs/desy.de/cms/tier2/unmerged/SAM/testSRM/SAM-dcache-se-cms.desy.de/lcg-util",
'grid-srm.physik.rwth-aachen.de': "srm://grid-srm.physik.rwth-aachen.de:8443/srm/managerv2?SFN=/pnfs/physik.rwth-aachen.de/cms/store/unmerged/SAM/testSRM/SAM-grid-srm.physik.rwth-aachen.de/lcg-util",
'ganymede.hep.kbfi.ee': "gsiftp://ganymede.hep.kbfi.ee:2811//cms/store/unmerged/SAM/testSRM/SAM-ganymede.hep.kbfi.ee/lcg-util",
'srm.ciemat.es': "srm://srm.ciemat.es:8443/srm/managerv2?SFN=/pnfs/ciemat.es/data/cms/prod/store/unmerged/SAM/testSRM/SAM-srm.ciemat.es/lcg-util",
'storm.ifca.es': "srm://storm.ifca.es:8444/srm/managerv2?SFN=/cms/store/unmerged/SAM/testSRM/SAM-storm.ifca.es/lcg-util",
'madhatter.csc.fi': "srm://madhatter.csc.fi:8443/srm/managerv2?SFN=/pnfs/csc.fi/data/cms/store/unmerged/SAM/testSRM/SAM-madhatter.csc.fi/lcg-util",
'ccsrmt2.in2p3.fr': "srm://ccsrmt2.in2p3.fr:8443/srm/managerv2?SFN=/pnfs/in2p3.fr/data/cms/t2data/store/unmerged/SAM/testSRM/SAM-ccsrmt2.in2p3.fr/lcg-util",
'node12.datagrid.cea.fr': "gsiftp://node12.datagrid.cea.fr/dpm/datagrid.cea.fr/home/cms/trivcat/store/unmerged/SAM/testSRM/SAM-node12.datagrid.cea.fr/lcg-util",
'polgrid4.in2p3.fr': "gsiftp://polgrid4.in2p3.fr/dpm/in2p3.fr/home/cms/trivcat/store/unmerged/SAM/testSRM/SAM-polgrid4.in2p3.fr/lcg-util",
'sbgse1.in2p3.fr': "srm://sbgse1.in2p3.fr:8446/srm/managerv2?SFN=/dpm/in2p3.fr/home/cms/phedex/store/unmerged/SAM/testSRM/SAM-sbgse1.in2p3.fr/lcg-util",
'grid02.physics.uoi.gr': "srm://grid02.physics.uoi.gr:8446/srm/managerv2?SFN=/dpm/physics.uoi.gr/home/cms/store/unmerged/SAM/testSRM/SAM-grid02.physics.uoi.gr/lcg-util",
'grid143.kfki.hu': "srm://grid143.kfki.hu:8446/srm/managerv2?SFN=/dpm/kfki.hu/home/cms/phedex/store/unmerged/SAM/testSRM/SAM-grid143.kfki.hu/lcg-util",
'se01.indiacms.res.in': "srm://se01.indiacms.res.in:8446/srm/managerv2?SFN=/dpm/indiacms.res.in/home/cms/store/unmerged/SAM/testSRM/SAM-se01.indiacms.res.in/lcg-util",
'storm-se-01.ba.infn.it': "srm://storm-se-01.ba.infn.it:8444/srm/managerv2?SFN=/cms/store/unmerged/SAM/testSRM/SAM-storm-se-01.ba.infn.it/lcg-util",
't2-srm-02.lnl.infn.it': "srm://t2-srm-02.lnl.infn.it:8443/srm/managerv2?SFN=/pnfs/lnl.infn.it/data/cms/store/unmerged/SAM/testSRM/SAM-t2-srm-02.lnl.infn.it/lcg-util",
'stormfe1.pi.infn.it': "srm://stormfe1.pi.infn.it:8444/srm/managerv2?SFN=/cms/store/unmerged/SAM/testSRM/SAM-stormfe1.pi.infn.it/lcg-util",
'cmsrm-se01.roma1.infn.it': "srm://cmsrm-se01.roma1.infn.it:8443/srm/managerv2?SFN=/pnfs/roma1.infn.it/data/cms/store/unmerged/SAM/testSRM/SAM-cmsrm-se01.roma1.infn.it/lcg-util",
'cms-t2-se01.sdfarm.kr': "srm://cms-t2-se01.sdfarm.kr:8443/srm/managerv2?SFN=/pnfs/sdfarm.kr/data/cms/store/unmerged/SAM/testSRM/SAM-cms-t2-se01.sdfarm.kr/lcg-util",
'pcncp22.ncp.edu.pk': "srm://pcncp22.ncp.edu.pk:8446/srm/managerv2?SFN=/dpm/ncp.edu.pk/home/cms/store/unmerged/SAM/testSRM/SAM-pcncp22.ncp.edu.pk/lcg-util",
'se.cis.gov.pl': "gsiftp://se.cis.gov.pl:2811//dpm/cis.gov.pl/home/cms/store/unmerged/SAM/testSRM/SAM-se.cis.gov.pl/lcg-util",
'se.grid.icm.edu.pl': "gsiftp://se.grid.icm.edu.pl/dpm/grid.icm.edu.pl/home/cms/phedex/store/store/unmerged/SAM/testSRM/SAM-se.grid.icm.edu.pl/lcg-util",
'srm01.ncg.ingrid.pt': "srm://srm01.ncg.ingrid.pt:8444/srm/managerv2?SFN=/cms/store/unmerged/SAM/testSRM/SAM-srm01.ncg.ingrid.pt/lcg-util",
'dp0015.m45.ihep.su': "srm://dp0015.m45.ihep.su:8443/srm/managerv2?SFN=/pnfs/m45.ihep.su/data/cms/store/unmerged/SAM/testSRM/SAM-dp0015.m45.ihep.su/lcg-util",
'grse001.inr.troitsk.ru': "srm://grse001.inr.troitsk.ru:8446/srm/managerv2?SFN=/dpm/inr.troitsk.ru/home/cms/store/unmerged/SAM/testSRM/SAM-grse001.inr.troitsk.ru/lcg-util",
'se3.itep.ru': "srm://se3.itep.ru:8443/srm/managerv2?SFN=/pnfs/itep.ru/data/cms/store/unmerged/SAM/testSRM/SAM-se3.itep.ru/lcg-util",
'lcgsedc01.jinr.ru': "srm://lcgsedc01.jinr.ru:8443/srm/managerv2?SFN=/pnfs/jinr.ru/data/cms/store/unmerged/SAM/testSRM/SAM-lcgsedc01.jinr.ru/lcg-util",
'eymir.grid.metu.edu.tr': "srm://eymir.grid.metu.edu.tr:8446/srm/managerv2?SFN=/dpm/grid.metu.edu.tr/home/cms/store/unmerged/SAM/testSRM/SAM-eymir.grid.metu.edu.tr/lcg-util",
'se01.grid.nchc.org.tw': "srm://se01.grid.nchc.org.tw:8446/srm/managerv2?SFN=/dpm/grid.nchc.org.tw/home/cms/store/unmerged/SAM/testSRM/SAM-se01.grid.nchc.org.tw/lcg-util",
'cms-se0.kipt.kharkov.ua': "srm://cms-se0.kipt.kharkov.ua:8446/srm/managerv2?SFN=/dpm/kipt.kharkov.ua/home/cms/store/unmerged/SAM/testSRM/SAM-cms-se0.kipt.kharkov.ua/lcg-util",
'dc2-grid-64.brunel.ac.uk': "gsiftp://dc2-grid-64.brunel.ac.uk/dpm/brunel.ac.uk/home/cms/store/unmerged/SAM/testSRM/SAM-dc2-grid-64.brunel.ac.uk/lcg-util",
'gfe02.grid.hep.ph.ic.ac.uk': "srm://gfe02.grid.hep.ph.ic.ac.uk:8443/srm/managerv2?SFN=/pnfs/hep.ph.ic.ac.uk/data/cms/store/unmerged/SAM/testSRM/SAM-gfe02.grid.hep.ph.ic.ac.uk/lcg-util",
'lcgse01.phy.bris.ac.uk': "gsiftp://lcgse01.phy.bris.ac.uk/dpm/phy.bris.ac.uk/home/cms/store/unmerged/SAM/testSRM/SAM-lcgse01.phy.bris.ac.uk/lcg-util",
'heplnx204.pp.rl.ac.uk': "srm://heplnx204.pp.rl.ac.uk:8443/srm/managerv2?SFN=/pnfs/pp.rl.ac.uk/data/cms/store/unmerged/SAM/testSRM/SAM-heplnx204.pp.rl.ac.uk/lcg-util",
'transfer.ultralight.org': "gsiftp://transfer.ultralight.org:2811//mnt/hadoop//store/unmerged/SAM/testSRM/SAM-transfer.ultralight.org/lcg-util",
'cmsio.rc.ufl.edu': "gsiftp://cmsio.rc.ufl.edu//cmsuf/data/store/unmerged/SAM/testSRM/SAM-cmsio.rc.ufl.edu/lcg-util",
'se01.cmsaf.mit.edu': "gsiftp://se01.cmsaf.mit.edu:2811/cms/store/unmerged/SAM/testSRM/SAM-se01.cmsaf.mit.edu/lcg-util",
'red-gridftp.unl.edu': "gsiftp://red-gridftp.unl.edu//mnt/hadoop/user/uscms01/pnfs/unl.edu/data4/cms/store/unmerged/SAM/testSRM/SAM-red-gridftp.unl.edu/lcg-util",
'cms-gridftp.rcac.purdue.edu': "gsiftp://cms-gridftp.rcac.purdue.edu//store/unmerged/SAM/testSRM/SAM-cms-gridftp.rcac.purdue.edu/lcg-util",
'gftp.t2.ucsd.edu': "gsiftp://gftp.t2.ucsd.edu/hadoop/cms/phedex/store/unmerged/SAM/testSRM/SAM-gftp.t2.ucsd.edu/lcg-util",
'gridftp.accre.vanderbilt.edu': "gsiftp://gridftp.accre.vanderbilt.edu/lio/lfs/cms/store/unmerged/SAM/testSRM/SAM-gridftp.accre.vanderbilt.edu/lcg-util",
'cms-lvs-gridftp.hep.wisc.edu': "gsiftp://cms-lvs-gridftp.hep.wisc.edu//hdfs/store/unmerged/SAM/testSRM/SAM-cms-lvs-gridftp.hep.wisc.edu/lcg-util",
'dcache.grid.uni-sofia.bg': "srm://dcache.grid.uni-sofia.bg:8443/srm/managerv2?SFN=/data/uni-sofia.bg/cms/store/unmerged/SAM/testSRM/SAM-dcache.grid.uni-sofia.bg/lcg-util",
'grid02.hep.by': "srm://grid02.hep.by:8444/srm/managerv2?SFN=/cms/store/unmerged/SAM/testSRM/SAM-grid02.hep.by/lcg-util",
'eospublicftp.cern.ch': "gsiftp://eospublicftp.cern.ch//eos/opendata/cms/upload/unmerged/SAM/testSRM/SAM-eospublicftp.cern.ch/lcg-util",
'data-bridge.cern.ch': "https://data-bridge.cern.ch/myfed/cms-output/unmerged/SAM/testSRM/SAM-data-bridge.cern.ch/lcg-util",
't3se01.psi.ch': "srm://t3se01.psi.ch:8443/srm/managerv2?SFN=/pnfs/psi.ch/cms/trivcat/store/unmerged/SAM/testSRM/SAM-t3se01.psi.ch/lcg-util",
'grid09.phy.pku.edu.cn': "srm://grid09.phy.pku.edu.cn:8446/srm/managerv2?SFN=/dpm//phy.pku.edu.cn/home/cms/store/unmerged/SAM/testSRM/SAM-grid09.phy.pku.edu.cn/lcg-util",
'lyogrid06.in2p3.fr': "srm://lyogrid06.in2p3.fr:8446/srm/managerv2?SFN=/dpm/in2p3.fr/home/cms/data/store/unmerged/SAM/testSRM/SAM-lyogrid06.in2p3.fr/lcg-util",
'lorienmaster.irb.hr': "srm://lorienmaster.irb.hr:8444/srm/managerv2?SFN=/STORE/se/cms/store/unmerged/SAM/testSRM/SAM-lorienmaster.irb.hr/lcg-util",
'dpm.grid.atomki.hu': "srm://dpm.grid.atomki.hu:8446/srm/managerv2?SFN=/dpm/grid.atomki.hu/home/cms/phedex/store/unmerged/SAM/testSRM/SAM-dpm.grid.atomki.hu/lcg-util",
'storage.vb-ehep.in': "srm://storage.vb-ehep.in:8446/srm/managerv2?SFN=/dpm/vb-ehep.in/home/cms/store/unmerged/SAM/testSRM/SAM-storage.vb-ehep.in/lcg-util",
'se1.particles.ipm.ac.ir': "srm://se1.particles.ipm.ac.ir:8446/srm/managerv2?SFN=/dpm/particles.ipm.ac.ir/home/cms/store/unmerged/SAM/testSRM/SAM-se1.particles.ipm.ac.ir/lcg-util",
'sebo-t3-01.cr.cnaf.infn.it': "srm://sebo-t3-01.cr.cnaf.infn.it:8444/srm/managerv2?SFN=/cms/store/unmerged/SAM/testSRM/SAM-sebo-t3-01.cr.cnaf.infn.it/lcg-util",
'storm.mib.infn.it': "srm://storm.mib.infn.it:8444/srm/managerv2?SFN=/cms/store/unmerged/SAM/testSRM/SAM-storm.mib.infn.it/lcg-util",
'gridse2.pg.infn.it': "srm://gridse2.pg.infn.it:8444/srm/managerv2?SFN=/cms/store/unmerged/SAM/testSRM/SAM-gridse2.pg.infn.it/lcg-util",
'gridsrm.ts.infn.it': "srm://gridsrm.ts.infn.it:8444/srm/managerv2?SFN=/cms/store/unmerged/SAM/testSRM/SAM-gridsrm.ts.infn.it/lcg-util",
'srm-eosinfnts.ts.infn.it': "gsiftp://srm-eosinfnts.ts.infn.it:2811//eos/infnts/cms/store/unmerged/SAM/testSRM/SAM-srm-eosinfnts.ts.infn.it/lcg-util",
'cms-se.sdfarm.kr': "gsiftp://cms-se.sdfarm.kr//xrootd/store/unmerged/SAM/testSRM/SAM-cms-se.sdfarm.kr/lcg-util",
'cluster142.knu.ac.kr': "srm://cluster142.knu.ac.kr:8443/srm/managerv2?SFN=/pnfs/knu.ac.kr/data/cms/store/unmerged/SAM/testSRM/SAM-cluster142.knu.ac.kr/lcg-util",
'phedex.sscc.uos.ac.kr': "gsiftp://phedex.sscc.uos.ac.kr:2811//hdfs/store/unmerged/SAM/testSRM/SAM-phedex.sscc.uos.ac.kr/lcg-util",
'proton.fis.cinvestav.mx': "gsiftp://proton.fis.cinvestav.mx//meson/data/store/unmerged/SAM/testSRM/SAM-proton.fis.cinvestav.mx/lcg-util",
'se2.grid.lebedev.ru': "srm://se2.grid.lebedev.ru:8446/srm/managerv2?SFN=/dpm/grid.lebedev.ru/home/cms/store/unmerged/SAM/testSRM/SAM-se2.grid.lebedev.ru/lcg-util",
'cms-phedex.lxfarm.mephi.ru': "srm://cms-phedex.lxfarm.mephi.ru:8443/data/phedex/unmerged/SAM/testSRM/SAM-cms-phedex.lxfarm.mephi.ru/lcg-util",
'cms-se.sc.chula.ac.th': "srm://cms-se.sc.chula.ac.th:8446/srm/managerv2?SFN=/dpm/sc.chula.ac.th/home/cms/store/unmerged/SAM/testSRM/SAM-cms-se.sc.chula.ac.th/lcg-util",
'grid71.phy.ncu.edu.tw': "srm://grid71.phy.ncu.edu.tw:8446/srm/managerv2?SFN=/dpm/phy.ncu.edu.tw/home/cms/store/unmerged/SAM/testSRM/SAM-grid71.phy.ncu.edu.tw/lcg-util",
'ntugrid6.phys.ntu.edu.tw': "srm://ntugrid6.phys.ntu.edu.tw:8446/srm/managerv2?SFN=/dpm/phys.ntu.edu.tw/home/cms/store/unmerged/SAM/testSRM/SAM-ntugrid6.phys.ntu.edu.tw/lcg-util",
'kodiak-se.baylor.edu': "gsiftp://kodiak-se.baylor.edu//cms/data/store/unmerged/SAM/testSRM/SAM-kodiak-se.baylor.edu/lcg-util",
'brux11.hep.brown.edu': "gsiftp://brux11.hep.brown.edu/mnt/hadoop/store/unmerged/SAM/testSRM/SAM-brux11.hep.brown.edu/lcg-util",
'cmsdata.phys.cmu.edu': "gsiftp://cmsdata.phys.cmu.edu//export/data/store/unmerged/SAM/testSRM/SAM-cmsdata.phys.cmu.edu/lcg-util",
'gridftp-hadoop.colorado.edu': "gsiftp://gridftp-hadoop.colorado.edu/mnt/hadoop/store/unmerged/SAM/testSRM/SAM-gridftp-hadoop.colorado.edu/lcg-util",
'uscms1-se.fltech-grid3.fit.edu': "srm://uscms1-se.fltech-grid3.fit.edu:8443/srm/v2/server?SFN=/mnt/nas1/store/unmerged/SAM/testSRM/SAM-uscms1-se.fltech-grid3.fit.edu/lcg-util",
'cmseos-gridftp.fnal.gov': "gsiftp://cmseos-gridftp.fnal.gov//eos/uscms/store/unmerged/SAM/testSRM/SAM-cmseos-gridftp.fnal.gov/lcg-util",
'hepcloud-poc.storage.googleapis.com': "s3://hepcloud-poc.storage.googleapis.com/store/unmerged/SAM/testSRM/SAM-hepcloud-poc.storage.googleapis.com/lcg-util",
't3serv010.mit.edu': "gsiftp://t3serv010.mit.edu:2811//cms/store/unmerged/SAM/testSRM/SAM-t3serv010.mit.edu/lcg-util",
'gc1-se.spa.umn.edu': "srm://gc1-se.spa.umn.edu:8443/srm/v2/server?SFN=/hdfs/cms/phedex/store/unmerged/SAM/testSRM/SAM-gc1-se.spa.umn.edu/lcg-util",
'deepthought.crc.nd.edu': "gsiftp://deepthought.crc.nd.edu/store/unmerged/SAM/testSRM/SAM-deepthought.crc.nd.edu/lcg-util",
'cms-0.mps.ohio-state.edu': "srm://cms-0.mps.ohio-state.edu:8443/srm/v2/server?SFN=/mnt/hadoop/se/store/unmerged/SAM/testSRM/SAM-cms-0.mps.ohio-state.edu/lcg-util",
'cms-se.hep.uprm.edu': "gsiftp://cms-se.hep.uprm.edu//data/store/unmerged/SAM/testSRM/SAM-cms-se.hep.uprm.edu/lcg-util",
'bonner07.rice.edu': "gsiftp://bonner07.rice.edu/cms/osg/stage_out/store/unmerged/SAM/testSRM/SAM-bonner07.rice.edu/lcg-util",
'ruhex-osgce.rutgers.edu': "gsiftp://ruhex-osgce.rutgers.edu/cms/se/phedex/store/unmerged/SAM/testSRM/SAM-ruhex-osgce.rutgers.edu/lcg-util",
'gw01.brazos.tamu.edu': "gsiftp://gw01.brazos.tamu.edu/cms/store/unmerged/SAM/testSRM/SAM-gw01.brazos.tamu.edu/lcg-util",
'sigmorgh.hpcc.ttu.edu': "srm://sigmorgh.hpcc.ttu.edu:49443/srm/v2/server?SFN=/lustre/hep/cms/buffer/store/unmerged/SAM/testSRM/SAM-sigmorgh.hpcc.ttu.edu/lcg-util",
'charm.ucr.edu': "srm://charm.ucr.edu:10443/srm/v2/server?SFN=/mnt/hadoop/cms/store/unmerged/SAM/testSRM/SAM-charm.ucr.edu/lcg-util",
'hepcms-gridftp.umd.edu': "gsiftp://hepcms-gridftp.umd.edu//mnt/hadoop/cms/store/unmerged/SAM/testSRM/SAM-hepcms-gridftp.umd.edu/lcg-util",
'umiss005.hep.olemiss.edu': "gsiftp://umiss005.hep.olemiss.edu/osgremote/osg_data/cms/store/unmerged/SAM/testSRM/SAM-umiss005.hep.olemiss.edu/lcg-util",
'osg-hep.phys.virginia.edu': "srm://osg-hep.phys.virginia.edu:18443/srm/v2/server?SFN=//raids/phedex3/unmerged/SAM/testSRM/SAM-osg-hep.phys.virginia.edu/lcg-util",
'se11.accre.vanderbilt.edu': "gsiftp://se11.accre.vanderbilt.edu:2812/store/unmerged/SAM/testSRM/SAM-se11.accre.vanderbilt.edu/lcg-util" }
outputList = {}
# LFN path for file to test transfers
self.printd('The LFN used for testing will be in: '+testLFN)
if ( testLFN != "/store/unmerged/SAM/testSRM" ):
self.printd("ERROR: LFN did not match pre-configured LFN")
nodeName = self.hostName
try:
pfn = PFNTable[nodeName]
except KeyError:
self.printd("WARNING: \"" + nodeName + "\" not in PFN table")
return ('UNKNOWN', "WARNING: \"" + nodeName + "\" not in PFN table")
self.printd("LFN was matched to PFN "+pfn)
#
spacetoken = None
spacetokendesc="nospacetoken"
self.printd("No space token defined")
if re.compile("^srm://.+srm/managerv2\?SFN=.+$").match(pfn) or re.compile("^srm://.+srm/v2/server\?SFN=.+$").match(pfn):
pfntonode=re.sub(":.+$","",re.sub("^srm://","",pfn))
if pfntonode != nodeName :
self.printd("WARNING: the resulting PFN matches to SRM "+pfntonode+" instead of SRM "+nodeName)
else:
fntemp = self._fileSRMPattern % (spacetokendesc, '%s', '%s')
fn = fntemp % (str(int(time.time())), samutils.uuidstr())
outputList[pfn] = {'fntemp': fntemp, 'fn': fn, 'space_token': spacetoken, 'space_token_get': spacetoken, 'userspace' : testLFN}
elif pfn.startswith("gsiftp://"):
pfntonode = urlparse.urlparse(pfn).hostname
fntemp = self._fileSRMPattern % (spacetokendesc,'%s','%s')
fn = fntemp % (str(int(time.time())), samutils.uuidstr())
outputList[pfn]={'fntemp' : fntemp, 'fn': fn, 'space_token': spacetoken, 'space_token_get': spacetoken, 'userspace' : testLFN}
else:
self.printd("WARNING: Invalid matching to srmv2 protocol")
self.printd("Note: this test currently supports only PFNs in the known srmv2 full endpoint formats:")
self.printd("srm://hostname:port/srm/managerv2?SFN=sitefilename")
self.printd("or")
self.printd("srm://hostname:port/srm/v2/server?SFN=sitefilename")
self.printd("or")
self.printd("gsiftp://hostname:port/sitefilename")
return ('OK', "WARNING: Invalid matching to srmv2 protocol")
self._voInfoDictionary = outputList
for outputPfns in outputList:
self.printd("The PFN path used for testing will be:")
self.printd(outputPfns+" : "+str(outputList[outputPfns]))
self.printd('Saving endpoints to %s' % self._fileVoInfoDictionary, v=2)
self.printd('Test results will be saved to %s' % self._fileHistoryVoInfoDictionary, v=2)
try:
self.saveVoInfoDictionary(self._fileVoInfoDictionary)
except IOError:
self.printd('Error saving VO Info Dictionary to file %s' % self._fileVoInfoDictionary)
try:
self.saveVoInfoDictionary(self._fileHistoryVoInfoDictionary)
except IOError:
self.printd('Error saving VO Info Dictionary history to file %s' % self._fileHistoryVoInfoDictionary)
return ('OK', "Got PFN and Space Token from PFN-Table Service")
def metricGetATLASInfo(self):
"""Get full SRM endpoint(s) and storage areas from ToACache.
"""
......@@ -607,7 +786,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
ep=info.split()[0]+'\n'
fp.write(ep)
fp.close()
except IOError, e:
except IOError as e:
try:
os.unlink(self._ldap_fileEndptSAPath)
except OSError: pass
......@@ -633,7 +812,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
[' %s: %s' % (x,str(y)) for x,y in req.items()]))
# Instantiate gfal2
ctx = gfal2.creat_context()
ctx = gfal2.creat_context()
self.print_time()
self.printd('Listing storage url(s).')
......@@ -647,7 +826,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
ctx.listdir(surl)
summary += '-ok;'
self.printd('-ok;')
except gfal2.GError, e:
except gfal2.GError as e:
em = probe.ErrorsMatching(self.errorDBFile, self.errorTopics)
er = em.match(e.message)
if er:
......@@ -658,7 +837,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
status = 'CRITICAL'
summary += '-%s;' % status.lower()
self.printd('-%s;\nERROR: %s\n' % (status.lower(), e.message))
except Exception, e:
except Exception as e:
return ('UNKNOWN', 'problem invoking gfal2 listdir(): %s:%s' % (str(e), sys.exc_info()[0]))
return (status, summary)
......@@ -679,12 +858,12 @@ class SRMVOMetrics(probe.MetricGatherer) :
for s in "1234567890": fp.write(s+'\n')
fp.close()
src_file = 'file://' + src_filename
except IOError, e:
except IOError as e:
self.printd('ERROR: %s' % str(e))
return ('UNKNOWN', 'Error opening local file.')
# Instantiate gfal2
ctx = gfal2.creat_context()
ctx = gfal2.creat_context()
for srmendpt in self._voInfoDictionary.keys():
# Set transfer parameters
......@@ -720,7 +899,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
total_transfer = datetime.datetime.now()-start_transfer
self.printd('Transfer Duration: %s' % str(total_transfer))
summary = stMsg % ''+ " Transfer time: "+str(total_transfer)
except gfal2.GError, e:
except gfal2.GError as e:
em = probe.ErrorsMatching(self.errorDBFile, self.errorTopics)
er = em.match(e.message)
if er:
......@@ -730,7 +909,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
status = 'CRITICAL'
summary = stMsg % ' NOT'
self.printd('ERROR: %s' % str(e))
except Exception, e:
except Exception as e:
status = 'UNKNOWN'
summary = stMsg % ' NOT'
self.printd('ERROR: %s:%s' % (str(e), sys.exc_info()[0]))
......@@ -774,7 +953,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
errmsg = ''
# Instantiate gfal2
ctx = gfal2.creat_context()
ctx = gfal2.creat_context()
summary = ''
for surl in req['surls']:
......@@ -786,7 +965,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
self.printd("stat: " + str(statp).replace('\n', ', '))
summary += '-ok;'
self.printd('-ok;')
except gfal2.GError, e:
except gfal2.GError as e:
em = probe.ErrorsMatching(self.errorDBFile, self.errorTopics)
er = em.match(e.message)
if er:
......@@ -797,7 +976,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
status = 'CRITICAL'
summary += '-%s;' % status.lower()
self.printd('-%s;\nERROR: %s\n' % (status.lower(), e.message))
except Exception, e:
except Exception as e:
return ('UNKNOWN', 'problem invoking gfal2 stat(): %s:%s' % (str(e), sys.exc_info()[0]))
return (status, summary)
......@@ -808,7 +987,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
self.printd(self.gfal2_ver)
# Instantiate gfal2
ctx = gfal2.creat_context()
ctx = gfal2.creat_context()
for srmendpt in self._voInfoDictionary.keys():
......@@ -831,7 +1010,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
self.printd('proto: %s - OK' % protocol)
self.printd('replicas: %s' % replicas)
summary = 'protocol OK-[%s]' % protocol
except gfal2.GError, e:
except gfal2.GError as e:
self.printd('proto: %s - FAILED' % protocol)
self.printd('error: %s' % e.message)
summary = 'protocol FAILED-[%s]' % protocol
......@@ -841,7 +1020,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
status = er[0][2]
else:
status = 'CRITICAL'
except Exception, e:
except Exception as e:
status = 'UNKNOWN'
self.printd('ERROR: %s\n%s' % (str(e), sys.exc_info()[0]))
......@@ -874,7 +1053,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
self.printd(self.gfal2_ver)
# Instantiate gfal2
ctx = gfal2.creat_context()
ctx = gfal2.creat_context()
for srmendpt in self._voInfoDictionary.keys():
......@@ -923,7 +1102,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
status = 'CRITICAL'
summary = stMsg % ('')+' Files differ!'
self.printd('Files differ!')
except gfal2.GError, e:
except gfal2.GError as e:
em = probe.ErrorsMatching(self.errorDBFile, self.errorTopics)
er = em.match(e.message)
if er:
......@@ -933,7 +1112,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
status = 'CRITICAL'
summary = stMsg % ' NOT'
self.printd('ERROR: %s' % str(e))
except Exception, e:
except Exception as e:
status = 'UNKNOWN'
summary = stMsg % ' NOT'
self.printd('ERROR: %s:%s' % (str(e), sys.exc_info()[0]))
......@@ -960,7 +1139,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
# (this may go to metricAll() in the superclass)
# Instantiate gfal2
ctx = gfal2.creat_context()
ctx = gfal2.creat_context()
for srmendpt in self._voInfoDictionary.keys():
......@@ -980,7 +1159,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
ctx.unlink(src_file)
status = 'OK'
summary = stMsg % ''
except gfal2.GError, e:
except gfal2.GError as e:
summary = stMsg % ' NOT'
em = probe.ErrorsMatching(self.errorDBFile, self.errorTopics)
er = em.match(e.message)
......@@ -989,7 +1168,7 @@ class SRMVOMetrics(probe.MetricGatherer) :
else:
status = 'CRITICAL'
self.printd('ERROR: %s:%s' % (str(e),sys.exc_info()[0]))
except Exception, e:
except Exception as e:
status = 'UNKNOWN'
summary = stMsg % ' NOT'
self.printd('ERROR: %s:%s' % (str(e),sys.exc_info()[0]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment