Skip to content

Commit 52fcbff

Browse files
committed
Drop dCache storage probe (SOFTWARE-2955)
1 parent 7e858c9 commit 52fcbff

File tree

2 files changed

+0
-96
lines changed

2 files changed

+0
-96
lines changed

osgtest/tests/test_54_gratia.py

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ def isProbeInfoProcessed(self, ProbePattern):
122122
(glexec:fermicloud101.fnal.gov, recordId= Record
123123
(Id: fermicloud101.fnal.gov:3299.0 CreateTime: 14 July 2013 at 22:21:48 GMT KeyInfo: null) ) saved.
124124
125-
2013-07-14 17:22:48,204 gratia.service(Thread-66) [FINE]: RecordProcessor: 0: ProbeDetails 3 / 3
126-
(dCache-storage:fermicloud101.fnal.gov, recordId= Record
127-
(Id: fermicloud101.fnal.gov:3356.0 CreateTime: 14 July 2013 at 22:22:18 GMT KeyInfo: null) ) saved
128-
129125
2013-07-14 17:23:18,294 gratia.service(Thread-66) [FINE]: RecordProcessor: 0: ProbeDetails 2 / 2
130126
(condor:fermicloud101.fnal.gov, recordId= Record
131127
(Id: fermicloud101.fnal.gov:3390.0 CreateTime: 14 July 2013 at 22:22:48 GMT KeyInfo: null) ) saved.
@@ -315,82 +311,6 @@ def test_11_checkdatabase_glexec_meter(self):
315311
'302'),
316312
'Failed Probe Data Validation in Database.')
317313

318-
#This test customizes /etc/gratia/dCache-storage/ProbeConfig file
319-
def test_12_modify_dcache_probeconfig(self):
320-
core.skip_ok_unless_installed('gratia-probe-dcache-storage', 'gratia-service')
321-
probeconfig = core.config['gratia.config.dir'] + "/dCache-storage/ProbeConfig"
322-
self.modify_probeconfig(probeconfig)
323-
self.patternreplace(probeconfig, "InfoProviderUrl", "InfoProviderUrl=\"http://fndca3a.fnal.gov:2288/info\"")
324-
325-
#This test copies logs for dcache probe
326-
def test_13_copy_dcache_logs(self):
327-
core.skip_ok_unless_installed('gratia-probe-dcache-storage', 'gratia-service')
328-
core.state['gratia.dcache-logs-copied'] = False
329-
self.assert_(self.copy_probe_logs(), "dcache log copy failed.")
330-
core.state['gratia.dcache-logs-copied'] = True
331-
332-
#This test executes dCache-storage
333-
def test_14_execute_dcache_storage(self):
334-
# Malformed XML errors due to network issues (SOFTWARE-1748)
335-
core.state['gratia.dcache-whitelisted-error'] = False
336-
whitelisted_errors = ['The element type "metric" must be terminated by the matching end-tag "</metric>".',
337-
'XML document structures must start and end within the same entity.']
338-
339-
core.skip_ok_unless_installed('gratia-probe-dcache-storage', 'gratia-service')
340-
core.state['gratia.dcache-storage-running'] = False
341-
self.skip_bad_if(core.state['gratia.dcache-logs-copied'] == False)
342-
if os.path.exists(core.config['gratia.log.file']):
343-
core.state['gratia.log.stat'] = core.get_stat(core.config['gratia.log.file'])
344-
core.log_message('stat.st_ino is: ' + str(core.state['gratia.log.stat'].st_ino))
345-
core.log_message('stat.st_size is: ' + str(core.state['gratia.log.stat'].st_size))
346-
command = ('/usr/share/gratia/dCache-storage/dCache-storage_meter.cron.sh',)
347-
status, stdout, stderr = core.system(command)
348-
if status != 0:
349-
for error in whitelisted_errors:
350-
if error in stdout:
351-
core.state['gratia.dcache-whitelisted-error'] = True
352-
break
353-
if not core.state['gratia.dcache-whitelisted-error']:
354-
self.fail(core.diagnose('Unable to execute dCache-storage.', command, status, stdout, stderr))
355-
356-
core.config['gratia.dcache-temp-dir'] = core.config['gratia.tmpdir.prefix'] + "subdir.dCache-storage" + \
357-
core.config['gratia.tmpdir.postfix']
358-
if core.state['gratia.database-installed'] == True:
359-
result = self.isProbeOutboxDirEmpty(core.config['gratia.dcache-temp-dir'])
360-
self.assert_(result, 'dCache-storage outbox check failed.')
361-
core.state['gratia.dcache-storage-running'] = True
362-
363-
364-
#This test checks the database after the successful execution of dCache-storage
365-
def test_15_checkdatabase_dcache_storage(self):
366-
core.skip_ok_unless_installed('gratia-probe-dcache-storage', 'gratia-service')
367-
self.skip_ok_if(core.state['gratia.dcache-whitelisted-error'], 'caught whitelisted error')
368-
self.skip_bad_unless(core.state['gratia.dcache-storage-running'])
369-
370-
self.assertEqual(True, self.isProbeInfoProcessed('dCache-storage'),
371-
'Sentinel signifying that Probe Information was processed NOT found.')
372-
373-
command = "echo \"use gratia_osgtest; " + \
374-
"select TotalSpace from StorageElementRecord where ProbeName like 'dCache-storage%';" + \
375-
core.config['gratia.sql.querystring'],
376-
status, total_space, _ = core.system(command, shell=True)
377-
self.assertEqual(status, 0, 'Unable to query Gratia Database TotalSpace from StorageElementRecord table.')
378-
379-
command = "echo \"use gratia_osgtest; " + \
380-
"select FreeSpace from StorageElementRecord where ProbeName like 'dCache-storage%';" + \
381-
core.config['gratia.sql.querystring'],
382-
status, free_space, _ = core.system(command, shell=True)
383-
self.assertEqual(status, 0, 'Unable to query Gratia Database FreeSpace from StorageElementRecord table.')
384-
385-
command = "echo \"use gratia_osgtest; " + \
386-
"select UsedSpace from StorageElementRecord where ProbeName like 'dCache-storage%';" + \
387-
core.config['gratia.sql.querystring'],
388-
status, used_space, _ = core.system(command, shell=True)
389-
self.assertEqual(status, 0, 'Unable to query Gratia Database UsedSpace from StorageElementRecord table.')
390-
391-
#Need to assert only after converting string to long...
392-
self.assert_(long(total_space) == (long(free_space) + long(used_space)))
393-
394314
#This test customizes /etc/gratia/condor/ProbeConfig file
395315
def test_16_modify_condor_probeconfig(self):
396316
core.skip_ok_unless_installed('gratia-probe-condor', 'gratia-service')

osgtest/tests/test_80_gratia.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,6 @@ def test_04_cleanup_glexec(self):
7373
# reraise the exception, as it's an unexpected error
7474
raise
7575

76-
#This test cleans up dcache related files
77-
def test_05_cleanup_dcache(self):
78-
79-
core.skip_ok_unless_installed('gratia-probe-dcache-storage', 'gratia-service')
80-
try:
81-
probeconfig = core.config['gratia.config.dir'] + "/dCache-storage/ProbeConfig"
82-
owner = os.path.basename(os.path.dirname(probeconfig))
83-
files.restore(probeconfig, owner)
84-
except OSError, e:
85-
if e.errno == 2:
86-
# suppress "No such file or directory" error
87-
pass
88-
else:
89-
# reraise the exception, as it's an unexpected error
90-
raise
91-
9276
#This test cleans up condor related files
9377
def test_06_cleanup_condor(self):
9478
core.skip_ok_unless_installed('gratia-probe-condor', 'gratia-service')

0 commit comments

Comments
 (0)