Merge "Add support for configuring frame rate per traffic flow for IXIA"
authorVolodymyr Mytnyk <volodymyrx.mytnyk@intel.com>
Mon, 17 Dec 2018 09:01:01 +0000 (09:01 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 17 Dec 2018 09:01:01 +0000 (09:01 +0000)
ansible/install.yaml
ansible/roles/configure_rabbitmq/tasks/main.yml
ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2 [deleted file]
ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2 [deleted file]
docker/supervisor.sh
docs/release/release-notes/release-notes.rst
yardstick/benchmark/runners/iteration.py
yardstick/tests/unit/benchmark/runner/test_iteration.py [new file with mode: 0644]

index 084cdce..0c7ad7e 100644 (file)
@@ -39,7 +39,7 @@
     - { role: configure_gui, when: installation_mode != inst_mode_container_pull }
     - { role: download_trex, when: installation_mode != inst_mode_container_pull }
     - { role: install_trex, when: installation_mode != inst_mode_container_pull }
-    - { role: configure_rabbitmq, when: installation_mode != inst_mode_container_pull }
+    - { role: configure_rabbitmq, when: installation_mode == inst_mode_baremetal }
 
 
   post_tasks:
index 4ff4222..3ad60c1 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 ---
-- name: Create rabbitmq configuration
-  template:
-    src: rabbitmq.config.j2
-    dest: /etc/rabbitmq/rabbitmq.config
-
-- name: Define user definitions file
-  template:
-    src: user_definitions.json.j2
-    dest: /etc/rabbitmq/definitions.json
-
 - name: Restart rabbitmq
   service:
     name: rabbitmq-server
 - name: rabbitmqctl start_app
   shell: rabbitmqctl start_app
 
-- name: Enable management plugin
-  shell: rabbitmq-plugins enable rabbitmq_management
+- name: Configure rabbitmq
+  rabbitmq_user:
+    user: yardstick
+    password: yardstick
+    configure_priv: .*
+    read_priv: .*
+    write_priv: .*
+    state: present
diff --git a/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2 b/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2
deleted file mode 100644 (file)
index 8f07edf..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
- [\r
-    {rabbitmq_management, [\r
-       {load_definitions, "/etc/rabbitmq/definitions.json"}\r
-    ]}\r
-].
\ No newline at end of file
diff --git a/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2 b/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2
deleted file mode 100644 (file)
index 7c811f1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
- {\r
-    "users": [{\r
-        "name": "yardstick",\r
-        "password_hash": "XHp9fBOE3vjTEf7ktiUBHqefW2g=",\r
-        "hashing_algorithm": "rabbit_password_hashing_sha256",\r
-        "tags": ""\r
-    }],\r
-    "vhosts": [{\r
-        "name": "/"\r
-    }],\r
-    "permissions": [{\r
-        "user": "yardstick",\r
-        "vhost": "/",\r
-        "configure": ".*",\r
-        "write": ".*",\r
-        "read": ".*"\r
-    }],\r
-    "parameters": [],\r
-    "policies": [],\r
-    "queues": [],\r
-    "exchanges": [],\r
-    "bindings": []\r
-}\r
index 44e34fb..bd17cfb 100755 (executable)
 
 # nginx service start when boot
 supervisor_config='/etc/supervisor/conf.d/yardstick.conf'
+rabbitmq_config='/etc/supervisor/conf.d/rabbitmq.conf'
 
 if [[ ! -e "${supervisor_config}" ]]; then
+
     cat << EOF > "${supervisor_config}"
 [supervisord]
 nodaemon = true
@@ -22,8 +24,18 @@ command = service nginx restart
 [program:yardstick_uwsgi]
 directory = /etc/yardstick
 command = uwsgi -i yardstick.ini
+EOF
+
+fi
+
+if [[ ! -e "${rabbitmq_config}" ]]; then
 
+    cat << EOF > "${rabbitmq_config}"
 [program:rabbitmq]
-command = service rabbitmq-server restart
+command = /bin/bash -c "service rabbitmq-server restart
+    rabbitmqctl start_app
+    rabbitmqctl add_user yardstick yardstick
+    rabbitmqctl set_permissions -p / yardstick '.*' '.*'"
 EOF
+
 fi
index 4b3f12b..914daa3 100644 (file)
@@ -33,6 +33,9 @@ Version History
 | November 9, 2018  | 7.0.0     | Yardstick for Gambia release    |
 |                   |           |                                 |
 +-------------------+-----------+---------------------------------+
+| December 14, 2018 | 7.1.0     | Yardstick for Gambia release    |
+|                   |           |                                 |
++-------------------+-----------+---------------------------------+
 
 
 Important Notes
@@ -111,19 +114,19 @@ Release Data
 | **Project**                    | Yardstick             |
 |                                |                       |
 +--------------------------------+-----------------------+
-| **Repo/tag**                   | yardstick/opnfv-7.0.0 |
+| **Repo/tag**                   | yardstick/opnfv-7.1.0 |
 |                                |                       |
 +--------------------------------+-----------------------+
-| **Yardstick Docker image tag** | opnfv-7.0.0           |
+| **Yardstick Docker image tag** | opnfv-7.1.0           |
 |                                |                       |
 +--------------------------------+-----------------------+
-| **Release designation**        | Gambia 7.0            |
+| **Release designation**        | Gambia 7.1            |
 |                                |                       |
 +--------------------------------+-----------------------+
-| **Release date**               | November 9, 2018      |
+| **Release date**               | December 14, 2018     |
 |                                |                       |
 +--------------------------------+-----------------------+
-| **Purpose of the delivery**    | OPNFV Gambia 7.0.0    |
+| **Purpose of the delivery**    | OPNFV Gambia 7.1.0    |
 |                                |                       |
 +--------------------------------+-----------------------+
 
@@ -269,7 +272,7 @@ List of Scenarios
 New Test cases
 --------------
 
-.. note:: Yardstick Gambia 7.0.0 adds no new test cases.
+.. note:: Yardstick Gambia 7.1.0 adds no new test cases.
 
 * Generic NFVI test cases
 
@@ -326,7 +329,7 @@ Feature additions
 Scenario Matrix
 ===============
 
-For Gambia 7.0.0, Yardstick was tested on the following scenarios:
+For Gambia 7.1.0, Yardstick was tested on the following scenarios:
 
 +-------------------------+------+---------+----------+------+
 |        Scenario         | Apex | Compass | Fuel-arm | Fuel |
@@ -370,58 +373,35 @@ Known Issues/Faults
 Corrected Faults
 ----------------
 
-Gambia 7.0.0:
+Gambia 7.1.0:
 
 +--------------------+--------------------------------------------------------------------------+
 | **JIRA REFERENCE** |                             **DESCRIPTION**                              |
 +====================+==========================================================================+
-| YARDSTICK-1137     | Fix CLI argument handling in nsb_setup.sh                                |
-+--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1220     | Get stats for multiple port simultaneously                               |
-+--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1260     | Added missing functionality to start VM and access it using SSH keys     |
-|                    | in Standalone contexts.                                                  |
-+--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1298     | Allows for in-line overriding/modification of traffic profile variables  |
-|                    | from the testcase file.                                                  |
+| YARDSTICK-1241     | Update NSB PROX devguide.                                                |
 +--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1368     | Updated existing test cases in Yardstick to minimize changes done        |
-|                    | manually to run standalone tests for Trex.                               |
+| YARDSTICK-1458     | NSB NFVi PROX Should report realtime port activity not historical data.  |
 +--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1389     | Add status filed for RFC2544 TC iterations                               |
+| YARDSTICK-1471     | Add Testcase Prox Standalone SRIOV.                                      |
 +--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1395     | Update 'configure_uwsgi' role to work in baremetal/container modes.      |
+| YARDSTICK-1475     | Adding Testcase for Prox Stanalone OvS-DPDK.                             |
 +--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1402     | Change IP assignment for VM to static for standalone context             |
+| YARDSTICK-1500     | Adding Testcase for Prox L2FWD PktTouch Stanalone OvS-DPDK.              |
 +--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1404     | CPU Utilization for VNF and traffic generator are now graphed on Grafana |
+| YARDSTICK-1517     | Missing opnfv "os-ovn-nofeature-ha" scenario test suite.                 |
 +--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1411     | Fix Yardstick Docker image ARM build                                     |
+| YARDSTICK-l526     | Run testcase 074 result overridden by job status.                        |
 +--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1414     | Update the pinned sampleVNF version to use a commit instead of a branch  |
+| YARDSTICK-1547     | Adding scale up test case for l3fwd OvS-DPDK.                            |
 +--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1418     | NSB PROX NFVi test now stops after reaching expected precision           |
+| YARDSTICK-1560     | Fix pip environment.                                                     |
 +--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1457     | Fix influxdb "field type conflict" error                                 |
+| YARDSTICK-1561     | L3FWD Gradana Dashboards Out-of-date and incorrect.                      |
 +--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1458     | Update Grafana to display "real-time" data instead of historical data.   |
-+--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1462     | NSB: Add OvS 2.8.1 support in SA context                                 |
-+--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1492     | Make OvS server to listen on TCP                                         |
-+--------------------+--------------------------------------------------------------------------+
-| YARDSTICK-1493     | The RX queues number is hard-codded and cannot be changed                |
-+--------------------+--------------------------------------------------------------------------+
-
 
-Gambia 7.0.0 known restrictions/issues
+Gambia 7.1.0 known restrictions/issues
 ======================================
 
-+-----------+-----------------------+------------------+
-| Installer |       Scenario        |      Issue       |
-+===========+=======================+==================+
-|   apex    |  os-ovn-nofeature-ha  |  YARDSTICK-1517  |
-+-----------+-----------------------+------------------+
 
 Useful links
 ============
index 4c88f36..58ab06a 100644 (file)
@@ -96,6 +96,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
             except Exception:  # pylint: disable=broad-except
                 errors = traceback.format_exc()
                 LOG.exception("")
+                raise
             else:
                 if result:
                     # add timeout for put so we don't block test
diff --git a/yardstick/tests/unit/benchmark/runner/test_iteration.py b/yardstick/tests/unit/benchmark/runner/test_iteration.py
new file mode 100644 (file)
index 0000000..783b236
--- /dev/null
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+import mock
+import unittest
+import multiprocessing
+from yardstick.benchmark.runners import iteration
+from yardstick.common import exceptions as y_exc
+
+
+class IterationRunnerTest(unittest.TestCase):
+    def setUp(self):
+        self.scenario_cfg = {
+            'runner': {'interval': 0, "duration": 0},
+            'type': 'some_type'
+        }
+
+        self.benchmark = mock.Mock()
+        self.benchmark_cls = mock.Mock(return_value=self.benchmark)
+
+    def _assert_defaults__worker_run_setup_and_teardown(self):
+        self.benchmark_cls.assert_called_once_with(self.scenario_cfg, {})
+        self.benchmark.setup.assert_called_once()
+
+    def _assert_defaults__worker_run_one_iteration(self):
+        self.benchmark.pre_run_wait_time.assert_called_once_with(0)
+        self.benchmark.my_method.assert_called_once_with({})
+
+    def test__worker_process_broad_exception(self):
+        self.benchmark.my_method = mock.Mock(
+            side_effect=y_exc.YardstickException)
+
+        with self.assertRaises(Exception):
+            iteration._worker_process(mock.Mock(), self.benchmark_cls, 'my_method',
+                                 self.scenario_cfg, {},
+                                 multiprocessing.Event(), mock.Mock())
+
+        self._assert_defaults__worker_run_one_iteration()
+        self._assert_defaults__worker_run_setup_and_teardown()