summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--baro_tests/collectd.py16
-rw-r--r--baro_tests/config_server.py17
-rw-r--r--baro_tests/tests.py4
-rw-r--r--docker/ansible/roles/config_files/tasks/additional_configs.yml23
-rw-r--r--docker/ansible/roles/config_files/tasks/default_read_import.yml83
-rw-r--r--docker/ansible/roles/config_files/tasks/main.yml11
-rw-r--r--puppet-barometer/templates/ovs_events.conf.erb2
7 files changed, 95 insertions, 61 deletions
diff --git a/baro_tests/collectd.py b/baro_tests/collectd.py
index 2682c2a0..188afab1 100644
--- a/baro_tests/collectd.py
+++ b/baro_tests/collectd.py
@@ -322,28 +322,28 @@ def _print_final_result_of_plugin(
elif (id, out_plugin, plugin, False) in results:
print_line += ' FAIL |'
else:
- print_line += ' NOT EX |'
+ print_line += ' SKIP |'
elif out_plugin == 'AODH':
if (id, out_plugin, plugin, True) in results:
print_line += ' PASS |'
elif (id, out_plugin, plugin, False) in results:
print_line += ' FAIL |'
else:
- print_line += ' FAIL |'
+ print_line += ' SKIP |'
elif out_plugin == 'SNMP':
if (id, out_plugin, plugin, True) in results:
print_line += ' PASS |'
elif (id, out_plugin, plugin, False) in results:
print_line += ' FAIL |'
else:
- print_line += ' FAIL |'
+ print_line += ' SKIP |'
elif out_plugin == 'CSV':
if (id, out_plugin, plugin, True) in results:
print_line += ' PASS |'
elif (id, out_plugin, plugin, False) in results:
print_line += ' FAIL |'
else:
- print_line += ' NOT EX |'
+ print_line += ' SKIP |'
else:
print_line += ' SKIP |'
return print_line
@@ -468,6 +468,9 @@ def _exec_testcase(
bridge for bridge in ovs_interfaces
if bridge in ovs_configured_bridges]
plugin_prerequisites = {
+ 'intel_rdt': [(
+ conf.is_rdt_available(compute_node),
+ 'RDT not avaialble on VMs')],
'mcelog': [(
conf.is_mcelog_installed(compute_node, 'mcelog'),
'mcelog must be installed.')],
@@ -504,8 +507,7 @@ def _exec_testcase(
'intel_rdt': [
'intel_rdt-0-2'],
'hugepages': [
- 'hugepages-mm-2048Kb', 'hugepages-node0-2048Kb',
- 'hugepages-node1-2048Kb'],
+ 'hugepages-mm-2048Kb', 'hugepages-node0-2048Kb',],
# 'ipmi': ['ipmi'],
'mcelog': [
'mcelog-SOCKET_0_CHANNEL_0_DIMM_any',
@@ -634,7 +636,7 @@ def mcelog_install():
for node in nodes:
if node.is_compute():
centos_release = node.run_cmd('uname -r')
- if '3.10.0-514.26.2.el7.x86_64' not in centos_release:
+ if centos_release not in ('3.10.0-514.26.2.el7.x86_64', '3.10.0-693.17.1.el7.x86_64'):
logger.info(
'Mcelog will NOT be enabled on node-{}.'
+ ' Unsupported CentOS release found ({}).'.format(
diff --git a/baro_tests/config_server.py b/baro_tests/config_server.py
index 6c67ee6a..2a4bc167 100644
--- a/baro_tests/config_server.py
+++ b/baro_tests/config_server.py
@@ -322,6 +322,17 @@ class ConfigServer(object):
else:
return 0
+ def is_rdt_available(self, compute):
+ """Check whether the compute node is a virtual machine."""
+ compute_name = compute.get_name()
+ nodes = get_apex_nodes()
+ for node in nodes:
+ if compute_name == node.get_dict()['name']:
+ stdout = node.run_cmd('cat /proc/cpuinfo | grep hypervisor')
+ if 'hypervisor' in stdout:
+ return False
+ return True
+
def is_libpqos_on_node(self, compute):
"""Check whether libpqos is present on compute node"""
@@ -532,7 +543,11 @@ class ConfigServer(object):
timestamps1 = {}
timestamps2 = {}
nodes = get_apex_nodes()
- sleep_time = plugin_interval + 2
+ if plugin_interval > 15:
+ sleep_time = plugin_interval*2
+ else:
+ sleep_time = 30
+
for node in nodes:
if node.is_controller():
self.__logger.info('Getting gnocchi metric list on {}' .format(
diff --git a/baro_tests/tests.py b/baro_tests/tests.py
index 580ee4d2..02eca90a 100644
--- a/baro_tests/tests.py
+++ b/baro_tests/tests.py
@@ -224,7 +224,9 @@ def test_csv_handles_plugin_data(
+ 'to interval...')
for metric in plugin_metrics:
logger.debug('{0} {1} {2} ... '.format(metric[0], metric[1], metric[2]))
- if math.floor(metric[3] - metric[2]) > interval:
+ # When there's a small interval or many metrics, there may be a slight
+ # delay in writing the metrics. e.g. a gap of 1.* is okay for an interval of 1
+ if math.floor(metric[3] - metric[2]) > interval + 1:
logger.error(
'Time of last two entries differ by '
+ '{}, but interval is {}'.format(
diff --git a/docker/ansible/roles/config_files/tasks/additional_configs.yml b/docker/ansible/roles/config_files/tasks/additional_configs.yml
new file mode 100644
index 00000000..28cad8a4
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/additional_configs.yml
@@ -0,0 +1,23 @@
+#Copyright 2018 OPNFV and Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+
+- name: copy additional configuration files to target system
+ template:
+ src: "{{ item }}"
+ dest: "{{ config_file_dir }}/{{ item | basename | regex_replace('\\.j2','') }}"
+ with_fileglob:
+ - "{{ additional_configs_path }}"
+ tags:
+ - copy_additional_configs
diff --git a/docker/ansible/roles/config_files/tasks/default_read_import.yml b/docker/ansible/roles/config_files/tasks/default_read_import.yml
index 589ace34..d70919b3 100644
--- a/docker/ansible/roles/config_files/tasks/default_read_import.yml
+++ b/docker/ansible/roles/config_files/tasks/default_read_import.yml
@@ -13,6 +13,14 @@
# limitations under the License.
---
+- name: enable contextswitch plugin
+ replace:
+ path: "{{ config_file_dir }}/default_read_plugins.conf"
+ regexp: '(\s+)#LoadPlugin contextswitch(\s+.*)?$'
+ replace: '\1LoadPlugin contextswitch\2'
+ tags:
+ - contextswitch
+
- name: enable cpu plugin
replace:
path: "{{ config_file_dir }}/default_read_plugins.conf"
@@ -29,6 +37,14 @@
tags:
- cpufreq
+- name: enable df plugin
+ replace:
+ path: "{{ config_file_dir }}/default_read_plugins.conf"
+ regexp: '(\s+)#LoadPlugin df(\s+.*)?$'
+ replace: '\1LoadPlugin df\2'
+ tags:
+ - df
+
- name: enable disk plugin
replace:
path: "{{ config_file_dir }}/default_read_plugins.conf"
@@ -37,6 +53,30 @@
tags:
- disk
+- name: enable ethstat plugin
+ replace:
+ path: "{{ config_file_dir }}/default_read_plugins.conf"
+ regexp: '(\s+)#LoadPlugin ethstat(\s+.*)?$'
+ replace: '\1LoadPlugin ethstat\2'
+ tags:
+ - ethstat
+
+- name: enable ipc plugin
+ replace:
+ path: "{{ config_file_dir }}/default_read_plugins.conf"
+ regexp: '(\s+)#LoadPlugin ipc(\s+.*)?$'
+ replace: '\1LoadPlugin ipc\2'
+ tags:
+ - ipc
+
+- name: enable irq plugin
+ replace:
+ path: "{{ config_file_dir }}/default_read_plugins.conf"
+ regexp: '(\s+)#LoadPlugin irq(\s+.*)?$'
+ replace: '\1LoadPlugin irq\2'
+ tags:
+ - irq
+
- name: enable load plugin
replace:
path: "{{ config_file_dir }}/default_read_plugins.conf"
@@ -69,46 +109,14 @@
tags:
- processes
-- name: enable irq plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin irq(\s+.*)?$'
- replace: '\1LoadPlugin irq\2'
- tags:
- - irq
-
- name: enable swap plugin
replace:
- path: "{{ config_file_dir }}/default_plugins.conf"
+ path: "{{ config_file_dir }}/default_read_plugins.conf"
regexp: '(\s+)#LoadPlugin swap(\s+.*)?$'
replace: '\1LoadPlugin swap\2'
tags:
- swap
-- name: enable ethstat plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin ethstat(\s+.*)?$'
- replace: '\1LoadPlugin ethstat\2'
- tags:
- - ethstat
-
-- name: enable ipc plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin ipc(\s+.*)?$'
- replace: '\1LoadPlugin ipc\2'
- tags:
- - ipc
-
-- name: enable df plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin df(\s+.*)?$'
- replace: '\1LoadPlugin df\2'
- tags:
- - df
-
- name: enable turbostat plugin
replace:
path: "{{ config_file_dir }}/default_read_plugins.conf"
@@ -124,12 +132,3 @@
replace: '\1LoadPlugin uptime\2'
tags:
- uptime
-
-- name: enable contextswitch plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin contextswitch(\s+.*)?$'
- replace: '\1LoadPlugin contextswitch\2'
- tags:
- - contextswitch
-
diff --git a/docker/ansible/roles/config_files/tasks/main.yml b/docker/ansible/roles/config_files/tasks/main.yml
index 7d3919a1..52535a09 100644
--- a/docker/ansible/roles/config_files/tasks/main.yml
+++ b/docker/ansible/roles/config_files/tasks/main.yml
@@ -74,12 +74,5 @@
- name: enable ipmi plugin
include: ipmi.yml
-- name: copy additional configuration files to target system
- template:
- src: "{{ item }}"
- dest: "{{ config_file_dir }}/{{ item | basename | regex_replace('\\.j2','') }}"
- tags:
- - always
- - copy_additional_configs
- with_fileglob:
- - "{{ additional_configs_path }}"
+- name: copy additional config files
+ include: additional_configs.yml
diff --git a/puppet-barometer/templates/ovs_events.conf.erb b/puppet-barometer/templates/ovs_events.conf.erb
index d72e2004..24344ec4 100644
--- a/puppet-barometer/templates/ovs_events.conf.erb
+++ b/puppet-barometer/templates/ovs_events.conf.erb
@@ -5,7 +5,7 @@
Port 6640
Socket "/var/run/openvswitch/db.sock"
Interfaces "br0" "veth0"
- SendNotification false
+ SendNotification true
DispatchValues true
</Plugin>