aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--baro_tests/collectd.py54
1 files changed, 28 insertions, 26 deletions
diff --git a/baro_tests/collectd.py b/baro_tests/collectd.py
index bf310f0..2682c2a 100644
--- a/baro_tests/collectd.py
+++ b/baro_tests/collectd.py
@@ -636,36 +636,38 @@ def mcelog_install():
centos_release = node.run_cmd('uname -r')
if '3.10.0-514.26.2.el7.x86_64' not in centos_release:
logger.info(
- 'Mcelog will not be enabled on node-{}, ' +
- ' unsupported CentOS relase found ({}).'.format(
- node.get_dict()['name'],
- centos_release))
+ 'Mcelog will NOT be enabled on node-{}.'
+ + ' Unsupported CentOS release found ({}).'.format(
+ node.get_dict()['name'],centos_release))
else:
logger.info(
- 'Checking if mcelog is enabled'
+ 'Checking if mcelog is enabled'
+ ' on node-{}...'.format(node.get_dict()['name']))
res = node.run_cmd('ls')
- if 'mce-inject_ea' and 'corrected' in res:
- logger.info(
- 'Mcelog seems to be already installed '
- + 'on node-{}.'.format(node.get_dict()['name']))
- node.run_cmd('sudo modprobe mce-inject')
- node.run_cmd('sudo ./mce-inject_ea < corrected')
- else:
- logger.info(
- 'Mcelog will be enabled on node-{}...'.format(
- node.get_dict()['id']))
- node.put_file(mce_bin, 'mce-inject_ea')
- node.run_cmd('chmod a+x mce-inject_ea')
- node.run_cmd('echo "CPU 0 BANK 0" > corrected')
- node.run_cmd(
- 'echo "STATUS 0xcc00008000010090" >>'
- + ' corrected')
- node.run_cmd(
- 'echo "ADDR 0x0010FFFFFFF" >> corrected')
- node.run_cmd('sudo modprobe mce-inject')
- node.run_cmd('sudo ./mce-inject_ea < corrected')
- logger.info('Mcelog is installed on all compute nodes')
+ if 'mce-inject_ea' and 'corrected' in res:
+ logger.info(
+ 'Mcelog seems to be already installed '
+ + 'on node-{}.'.format(node.get_dict()['name']))
+ node.run_cmd('sudo modprobe mce-inject')
+ node.run_cmd('sudo ./mce-inject_ea < corrected')
+ else:
+ logger.info(
+ 'Mcelog will be enabled '
+ + 'on node-{}...'.format(node.get_dict()['name']))
+ node.put_file(mce_bin, 'mce-inject_ea')
+ node.run_cmd('chmod a+x mce-inject_ea')
+ node.run_cmd('echo "CPU 0 BANK 0" > corrected')
+ node.run_cmd(
+ 'echo "STATUS 0xcc00008000010090" >>'
+ + ' corrected')
+ node.run_cmd(
+ 'echo "ADDR 0x0010FFFFFFF" >> corrected')
+ node.run_cmd('sudo modprobe mce-inject')
+ node.run_cmd('sudo ./mce-inject_ea < corrected')
+ logger.info(
+ 'Mcelog was installed '
+ + 'on node-{}.'.format(node.get_dict()['name']))
+
def mcelog_delete():