Merge "ansible: add task to copy custom types.db file to targets"
authorGordon Kelly <gordon.kelly@intel.com>
Tue, 20 Mar 2018 09:25:19 +0000 (09:25 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 20 Mar 2018 09:25:19 +0000 (09:25 +0000)
baro_tests/collectd.py
baro_tests/config_server.py
baro_tests/tests.py
docs/release/configguide/postinstall.rst
puppet-barometer/templates/ovs_events.conf.erb

index 2682c2a..188afab 100644 (file)
@@ -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(
index 6c67ee6..2a4bc16 100644 (file)
@@ -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(
index 580ee4d..02eca90 100644 (file)
@@ -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(
index 602a8d5..d03f99a 100644 (file)
@@ -27,24 +27,23 @@ The following steps describe how to perform a simple "manual" testing of the Bar
 
 On the controller:
 
-You will need update the archive policy rule for gnocchi via the command line.
-The default is low, which means that you only get a metric every
-5 minutes. To do this:
+1. Get a list of the available metrics:
 
-.. code:: bash
+   .. code::
 
-    $ openstack metric archive-policy rule delete default
-    $ openstack metric archive-policy-rule create  -a bool -m '*'  default
+      $ openstack metric list
 
-Using the ``bool`` archive policy reduces the number of aggregation methods run
-to one (last), and it keeps all metrics at a 1 second interval.
-In order to query this you need to explicitly choose an aggregation method to
-display (by default, ``measures show`` uses mean). You may have to update the
-command for checking the metrics, this is the CLI command:
+2. Take note of the ID of the metric of interest, and show the measures of this metric:
 
-.. code:: bash
+   .. code::
 
-     $ watch –n2 –d openstack metric measures show  --aggregation last <metric_id>
+      $ openstack metric measures show <metric_id>
+
+3. Watch the measure list for updates to verify that metrics are being added:
+
+   .. code:: bash
+
+      $ watch –n2 –d openstack metric measures show <metric_id>
 
 More on testing and displaying metrics is shown below.
 
index d72e200..24344ec 100644 (file)
@@ -5,7 +5,7 @@
    Port 6640
    Socket "/var/run/openvswitch/db.sock"
    Interfaces "br0" "veth0"
-   SendNotification false
+   SendNotification true
    DispatchValues true
 </Plugin>