From 5b48b7ceff2fb7cecfa6b2afbf8874c371407f69 Mon Sep 17 00:00:00 2001 From: Nate Johnston Date: Thu, 2 Jul 2020 15:41:39 -0400 Subject: [PATCH] Add Loki testing for Neutron This commit adds a non-voting job, based on tempest, which enables the transient DB failure injection module 'loki' [1]. This will test neutron resilience to database errors. [1] https://docs.openstack.org/neutron/latest//contributor/testing/db_transient_failure_injection.html Co-Authored-By: Slawek Kaplonski Change-Id: Ie6293923a4a4744888bf3ee36007267ef0fddfd9 --- devstack/lib/loki | 6 ++++++ devstack/plugin.sh | 4 ++++ doc/source/contributor/testing/ci_scenario_jobs.rst | 5 +++++ zuul.d/project.yaml | 2 ++ zuul.d/tempest-singlenode.yaml | 9 +++++++++ 5 files changed, 26 insertions(+) create mode 100644 devstack/lib/loki diff --git a/devstack/lib/loki b/devstack/lib/loki new file mode 100644 index 00000000000..5f78f159035 --- /dev/null +++ b/devstack/lib/loki @@ -0,0 +1,6 @@ +# For more information on loki, see: +# https://docs.openstack.org/neutron/latest//contributor/testing/db_transient_failure_injection.html + +function configure_loki { + neutron_service_plugin_class_add "loki" +} diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 71dd93b6ee2..14aa01a9d0e 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -18,6 +18,7 @@ source $LIBDIR/fip_port_forwarding source $LIBDIR/uplink_status_propagation source $LIBDIR/tag_ports_during_bulk_creation source $LIBDIR/octavia +source $LIBDIR/loki Q_BUILD_OVS_FROM_GIT=$(trueorfalse False Q_BUILD_OVS_FROM_GIT) @@ -116,6 +117,9 @@ if [[ "$1" == "stack" ]]; then configure_ovn_plugin start_ovn fi + if is_service_enabled neutron-loki; then + configure_loki + fi ;; extra) if is_service_enabled q-sriov-agt neutron-sriov-agent; then diff --git a/doc/source/contributor/testing/ci_scenario_jobs.rst b/doc/source/contributor/testing/ci_scenario_jobs.rst index 81880d9d8d6..d024da4fdab 100644 --- a/doc/source/contributor/testing/ci_scenario_jobs.rst +++ b/doc/source/contributor/testing/ci_scenario_jobs.rst @@ -80,6 +80,11 @@ Below is a summary of those jobs. | |(only tests related to | | | | | | | | | | | |Neutron and Nova) | | | | | | | | | | +----------------------------------------------+----------------------------------+---------+-------+-------------+-----------------+----------+-------+--------+------------+-------------+ + |neutron-tempest-with-uwsgi-loki |tempest.api (without slow tests) | 3.6 | 1 | openvswitch | openvswitch | legacy | False | False | True | No | + |(non-voting) |tempest.scenario | | | | | | | | | | + | |(only tests related to | | | | | | | | | | + | |Neutron and Nova) | | | | | | | | | | + +----------------------------------------------+----------------------------------+---------+-------+-------------+-----------------+----------+-------+--------+------------+-------------+ |tempest-ipv6-only |tempest smoke + IPv6 tests | 3.6 | 1 | openvswitch | openvswitch | legacy | False | False | True | Yes | +----------------------------------------------+----------------------------------+---------+-------+-------------+-----------------+----------+-------+--------+------------+-------------+ |neutron-ovn-tempest-ovs-release |Various tempest api, scenario | 3.6 | 1 | ovn | ovn | --- | False | False | True | Yes | diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index d83dec6f28f..5012797dbce 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -52,6 +52,8 @@ - neutron-ovn-tempest-ovs-release - neutron-ovn-tempest-ovs-release-ipv6-only: voting: false + - neutron-tempest-with-uwsgi-loki: + voting: false # TODO(slaweq): add this job again to the check queue when it will be # working fine on python 3 #- networking-midonet-tempest-aio-ml2-centos-7: diff --git a/zuul.d/tempest-singlenode.yaml b/zuul.d/tempest-singlenode.yaml index 7117abcc57d..78e92f8fd6b 100644 --- a/zuul.d/tempest-singlenode.yaml +++ b/zuul.d/tempest-singlenode.yaml @@ -200,6 +200,15 @@ br-int-flows: true irrelevant-files: *irrelevant-files +- job: + name: neutron-tempest-with-uwsgi-loki + parent: neutron-tempest-with-uwsgi + timeout: 10800 + vars: + devstack_services: + neutron-loki: true + irrelevant-files: *irrelevant-files + - job: name: neutron-ovn-base description: Base job for devstack/tempest to test Neutron with ovn driver.