Commit 96e0404f authored by Marian Babik's avatar Marian Babik
Browse files

reverted ARC native client

parent 3e3e5188
......@@ -8,6 +8,8 @@ log = logging.getLogger('ncgx')
SAME_CODES = {'OK': 10, 'INFO': 20, 'NOTICE': 30, 'WARNING': 40, 'ERROR': 50, 'CRITICAL': 60, 'MAINTENANCE': 100}
CE_STATE_METRICS = ['org.sam.CONDOR-JobState-/cms/Role=lcgadmin']
FLAVOR_MAP = {'CREAM-CE': 'cream',
'ARC-CE': 'arc',
'HTCONDOR-CE': 'condor',
......@@ -150,36 +152,21 @@ def run(url, ipv6=False):
log.warning("Unable to determine type for flavour %s" % flavor)
continue
res = "%s://%s/%s/%s/%s" % (FLAVOR_MAP[flavor], host, 'nosched', batch, queue)
if flavor == 'ARC-CE': # ARC native client
if endpoint:
c.add('org.sam.ARC-JobState-/cms/Role=lcgadmin', hosts=(service[0],),
params={'args': {'--resource': '%s' % res, '--arc-rsl': '\'(memory=2000)\'',
'--arc-debug': 'VERBOSE', '--arc-sub-type': 'emies',
'--arc-ce': 'https://{}/arex'.format(endpoint)}})
else:
c.add('org.sam.ARC-JobState-/cms/Role=lcgadmin', hosts=(service[0],),
params={'args': {'--resource': '%s' % res, '--arc-rsl': '\'(memory=2000)\'',
'--arc-debug': 'VERBOSE', '--arc-sub-type': 'emies'}})
# special handling: native ARC client
if flavor == 'ARC-CE' and host in ['ce0004.m45.ihep.su', 'ce0005.m45.ihep.su']:
c.add('org.sam.ARC-JobState-/cms/Role=lcgadmin', hosts=(service[0],),
params={'args': {'--resource': '%s' % res, '--arc-rsl': '\'(memory=2000)\'',
'--arc-debug': 'VERBOSE', '--arc-sub-type': 'emies'}})
continue
# GLOBUS ?
log.warning("Unexpected host/flavor: {} {}".format(host, flavor))
c.add('org.sam.CONDOR-JobState-/cms/Role=lcgadmin', hosts=(service[0],),
params={'args': {'--resource': '%s' % res}})
for m in CE_STATE_METRICS:
if flavor == 'ARC-CE':
c.add(m, hosts=(service[0],), params={'args': {'--resource': '%s' % res,
'--arc-rsl': '\'(memory=2000)\''}})
else:
c.add(m, hosts=(service[0],), params={'args': {'--resource': '%s' % res}})
else:
# no queues
res = "%s://%s/%s/%s/%s" % (FLAVOR_MAP[flavor], host, 'nosched', 'nobatch', 'noqueue')
if flavor == 'ARC-CE': # ARC native client
if endpoint:
c.add('org.sam.ARC-JobState-/cms/Role=lcgadmin', hosts=(service[0],),
params={'args': {'--resource': '%s' % res, '--arc-rsl': '\'(memory=2000)\'',
'--arc-debug': 'VERBOSE', '--arc-sub-type': 'emies',
'--arc-ce': 'https://{}/arex'.format(endpoint)}})
else:
c.add('org.sam.ARC-JobState-/cms/Role=lcgadmin', hosts=(service[0],),
params={'args': {'--resource': '%s' % res, '--arc-rsl': '\'(memory=2000)\'',
'--arc-debug': 'VERBOSE', '--arc-sub-type': 'emies'}})
continue
c.add('org.sam.CONDOR-JobState-/cms/Role=lcgadmin', hosts=(service[0],),
params={'args': {'--resource': '%s' % res}})
for m in CE_STATE_METRICS:
c.add(m, hosts=(service[0],), params={'args': {'--resource': '%s' % res}})
c.serialize()
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