summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--baro_tests/barometer.py2
-rw-r--r--baro_tests/collectd.py4
-rw-r--r--baro_tests/config_server.py15
-rw-r--r--baro_tests/local_agent.py8
-rw-r--r--baro_tests/tests.py4
-rw-r--r--docker/ansible/roles/config_files/tasks/make_mcelog.yml35
-rw-r--r--docker/ansible/roles/config_files/tasks/mcelog.yml14
-rw-r--r--docs/release/userguide/docker.userguide.rst13
8 files changed, 81 insertions, 14 deletions
diff --git a/baro_tests/barometer.py b/baro_tests/barometer.py
index a798f245..f75dbc31 100644
--- a/baro_tests/barometer.py
+++ b/baro_tests/barometer.py
@@ -1,5 +1,7 @@
#!/usr/bin/env python
#
+# Copyright 2017 OPNFV
+#
# 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
diff --git a/baro_tests/collectd.py b/baro_tests/collectd.py
index 4148c27a..86871b47 100644
--- a/baro_tests/collectd.py
+++ b/baro_tests/collectd.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
-
+#
+# Copyright 2017 OPNFV
+#
# 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
diff --git a/baro_tests/config_server.py b/baro_tests/config_server.py
index 71d4f152..d64a9146 100644
--- a/baro_tests/config_server.py
+++ b/baro_tests/config_server.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
#
+# Copyright 2017 OPNFV
+#
# 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
@@ -35,6 +37,8 @@ APEX_IP = os.getenv("INSTALLER_IP").rstrip('\n')
APEX_USER = 'root'
APEX_USER_STACK = 'stack'
APEX_PKEY = '/root/.ssh/id_rsa'
+TEST_VM_IMAGE = 'cirros-0.4.0-x86_64-disk.img'
+TEST_VM_IMAGE_PATH = '/home/opnfv/functest/images/' + TEST_VM_IMAGE
class Node(object):
@@ -381,7 +385,7 @@ class ConfigServer(object):
'| sed -e "s/#.*$//" | sed -e "s/=/:/"'
)
stdout = node.run_cmd(readcmd)
- agent_conf = {"server": yaml.load(stdout)}
+ agent_conf = {"server": yaml.safe_load(stdout)}
pingcmd = (
'ping -n -c1 ' + agent_conf["server"]["amqp_host"] +
@@ -793,18 +797,13 @@ class ConfigServer(object):
self.__logger.debug('Create command is executed in {}' .format(
(controller_node.get_dict()['name'])))
- image_filename = 'cirros-0.4.0-x86_64-disk.img'
- controller_node.run_cmd(
- 'curl -sO '
- 'http://download.cirros-cloud.net/0.4.0/'
- + image_filename)
-
node.put_file(constants.ENV_FILE, 'overcloudrc.v3')
+ node.put_file(TEST_VM_IMAGE_PATH, TEST_VM_IMAGE)
image = controller_node.run_cmd(
'source overcloudrc.v3;'
'openstack image create -f value -c id'
' --disk-format qcow2 --file {0} {1}'
- .format(image_filename, test_name))
+ .format(TEST_VM_IMAGE, test_name))
flavor = controller_node.run_cmd(
'source overcloudrc.v3;'
'openstack flavor create -f value -c id {}'
diff --git a/baro_tests/local_agent.py b/baro_tests/local_agent.py
index 8201dee0..1a50d963 100644
--- a/baro_tests/local_agent.py
+++ b/baro_tests/local_agent.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
-
+#
+# Copyright 2018 OPNFV
+#
# 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
@@ -24,6 +26,8 @@ import tests
logger = None
+TEMP_DIR = '/root'
+
class LocalAgentClient(object):
"""Client to request LocalAgent"""
@@ -201,7 +205,7 @@ def local_agent_main(bt_logger, conf, computes):
if agent_server_running:
test_name = 'barotest'
- tmpfile = '/tmp/' + test_name + '.conf'
+ tmpfile = TEMP_DIR + '/' + test_name + '.conf'
agent_config = conf.get_localagent_config(compute_node)
listen_ip = compute_node.get_ip()
diff --git a/baro_tests/tests.py b/baro_tests/tests.py
index bd49583d..d315fcf1 100644
--- a/baro_tests/tests.py
+++ b/baro_tests/tests.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
-
+#
+# Copyright 2017 OPNFV
+#
# 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
diff --git a/docker/ansible/roles/config_files/tasks/make_mcelog.yml b/docker/ansible/roles/config_files/tasks/make_mcelog.yml
new file mode 100644
index 00000000..d05b9433
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/make_mcelog.yml
@@ -0,0 +1,35 @@
+#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: extract mcelog from online archive
+ unarchive:
+ src: https://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git/snapshot/mcelog-161.tar.gz
+ dest: /tmp
+ remote_src: yes
+
+- name: make mcelog
+ make:
+ chdir: /tmp/mcelog-161
+
+- name: make install mcelog
+ make:
+ chdir: /tmp/mcelog-161
+ target: install
+
+- name: copy mcelog service
+ copy:
+ src: /tmp/mcelog-161/mcelog.service
+ dest: /etc/systemd/system/mcelog.service
+ remote_src: yes
diff --git a/docker/ansible/roles/config_files/tasks/mcelog.yml b/docker/ansible/roles/config_files/tasks/mcelog.yml
index 794db98c..be185092 100644
--- a/docker/ansible/roles/config_files/tasks/mcelog.yml
+++ b/docker/ansible/roles/config_files/tasks/mcelog.yml
@@ -22,6 +22,20 @@
tags:
- mcelogs
+- name: check if mcelog present
+ shell: which mcelog > /dev/null
+ register: mcelog_present
+ ignore_errors: "true"
+ when: install_mcelog|default(false)|bool
+ tags:
+ - mcelogs
+
+- name: build mcelog from sources if not in package
+ import_tasks: make_mcelog.yml
+ when: mcelog_present|failed and install_mcelog|default(false)|bool
+ tags:
+ - mcelogs
+
- name: start mcelog daemon if not running
service:
name: mcelog
diff --git a/docs/release/userguide/docker.userguide.rst b/docs/release/userguide/docker.userguide.rst
index d9e67478..cc9dd049 100644
--- a/docs/release/userguide/docker.userguide.rst
+++ b/docs/release/userguide/docker.userguide.rst
@@ -183,6 +183,12 @@ To install Ansible 2.6.3 on Centos:
$ sudo -H pip install 'ansible==2.6.3'
$ sudo yum install git
+.. note::
+ When using multi-node-setup, please make sure that 'python' package is
+ installed on all of the target nodes (ansible during 'Gathering facts'
+ phase is using python2 and it may not be installed by default on some
+ distributions - e.g. on Ubuntu 16.04 it has to be installed manually)
+
Clone barometer repo
^^^^^^^^^^^^^^^^^^^^
@@ -343,11 +349,14 @@ To make some changes when a container is running run:
List of default plugins for collectd container
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+.. note::
+ The dpdk plugins dpdkevents and dpdkstat were tested with DPDK v16.11.
By default the collectd is started with default configuration which includes the followin plugins:
* csv, contextswitch, cpu, cpufreq, df, disk, ethstat, ipc, irq, load, memory, numa, processes,
swap, turbostat, uuid, uptime, exec, hugepages, intel_pmu, ipmi, write_kafka, logfile, mcelog,
- network, intel_rdt, rrdtool, snmp_agent, syslog, virt, ovs_stats, ovs_events
+ network, intel_rdt, rrdtool, snmp_agent, syslog, virt, ovs_stats, ovs_events, dpdkevents,
+ dpdkstat
Some of the plugins are loaded depending on specific system requirements and can be omitted if
dependency is not met, this is the case for:
@@ -392,7 +401,7 @@ plugins tags
The following tags can be used to enable/disable plugins: csv, contextswitch, cpu,
cpufreq, df, disk, ethstat, ipc, irq, load, memory, numa, processes, swap, turbostat,
uptime, exec, hugepages, ipmi, kafka, logfile, mcelogs, network, pmu, rdt, rrdtool,
- snmp, syslog, virt, ovs_stats, ovs_events, uuid.
+ snmp, syslog, virt, ovs_stats, ovs_events, uuid, dpdkevents, dpdkstat.
Installing Docker
-----------------