[OVN] Enable qos service plugin in tempest jobs

This patch adds QoS service plugin and enable QoS
tests whiel using OVN as a backend.

Note that:
* We need to compile OVS kernel module, in order to support
  OpenFlow Meter action in Ubuntu [1]
* Because of bug [2] for now we need also to create the integration
  bridge with specified OpenFlow version 1.3.
* Added qos extension to the list of neutron extensions in tempest
  config file to be able to run qos related tests.

[1] https://mail.openvswitch.org/pipermail/ovs-discuss/2018-December/048009.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1782834

Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com>

Change-Id: I175511acef0e661bd1f282f37b1e528959c118a5
This commit is contained in:
Maciej Józefczyk 2020-01-29 17:04:07 +01:00
parent 89ab82d57e
commit ba35c0fc29
3 changed files with 21 additions and 2 deletions

View File

@ -133,7 +133,7 @@ Q_ML2_PLUGIN_MECHANISM_DRIVERS=${Q_ML2_PLUGIN_MECHANISM_DRIVERS:-ovn,logger}
Q_ML2_PLUGIN_TYPE_DRIVERS=${Q_ML2_PLUGIN_TYPE_DRIVERS:-local,flat,vlan,geneve}
Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-"geneve"}
Q_ML2_PLUGIN_GENEVE_TYPE_OPTIONS=${Q_ML2_PLUGIN_GENEVE_TYPE_OPTIONS:-"vni_ranges=1:65536"}
Q_ML2_PLUGIN_EXT_DRIVERS=${Q_ML2_PLUGIN_EXT_DRIVERS:-port_security,dns}
Q_ML2_PLUGIN_EXT_DRIVERS=${Q_ML2_PLUGIN_EXT_DRIVERS:-port_security,dns,qos}
ML2_L3_PLUGIN="ovn-router,trunk"
@ -162,7 +162,7 @@ function use_new_ovn_repository {
# neutron-ovs-cleanup uses the OVSDB native interface.
function ovn_base_setup_bridge {
local bridge=$1
local addbr_cmd="ovs-vsctl --no-wait -- --may-exist add-br $bridge"
local addbr_cmd="ovs-vsctl --no-wait -- --may-exist add-br $bridge -- set bridge $bridge protocols=OpenFlow13"
if [ "$OVS_DATAPATH_TYPE" != "system" ] ; then
addbr_cmd="$addbr_cmd -- set Bridge $bridge datapath_type=${OVS_DATAPATH_TYPE}"
@ -328,10 +328,12 @@ function _prepare_for_ovs_compilation {
# Reload the ovs kernel modules
function _reload_ovs_kernel_modules {
set +e
ovs_system=$(sudo ovs-dpctl dump-dps | grep ovs-system)
if [ -n "$ovs_system" ]; then
sudo ovs-dpctl del-dp ovs-system
fi
set -e
sudo modprobe -r vport_geneve
sudo modprobe -r openvswitch
sudo modprobe openvswitch || (dmesg && die $LINENO "FAILED TO LOAD openvswitch")
@ -499,6 +501,9 @@ function configure_ovn_plugin {
export NETWORK_API_EXTENSIONS=$NETWORK_API_EXTENSIONS,$($PYTHON -c \
'from neutron.common.ovn import extensions ;\
print(",".join(extensions.ML2_SUPPORTED_API_EXTENSIONS_OVN_L3))')
if is_service_enabled q-qos neutron-qos ; then
export NETWORK_API_EXTENSIONS="$NETWORK_API_EXTENSIONS,qos"
fi
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_geneve max_header_size=$OVN_GENEVE_OVERHEAD
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_nb_connection="$OVN_NB_REMOTE"
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_sb_connection="$OVN_SB_REMOTE"

View File

@ -109,6 +109,10 @@
ENABLE_CHASSIS_AS_GW: true
OVN_L3_CREATE_PUBLIC_NETWORK: true
OVN_DBS_LOG_LEVEL: dbg
# TODO(mjozefcz): Stop compiling OVS modules when meter action in kernel
# will be released in Ubuntu Bionic.
# More info: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-December/048009.html
OVN_BUILD_MODULES: True
DOWNLOAD_DEFAULT_IMAGES: false
IMAGE_URLS: "http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img,https://cloud-images.ubuntu.com/releases/xenial/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img"
DEFAULT_IMAGE_NAME: cirros-0.4.0-x86_64-disk
@ -154,6 +158,7 @@
s-object: false
s-proxy: false
tls-proxy: true
q-qos: true
group-vars:
subnode:
devstack_services:
@ -183,6 +188,10 @@
OVN_DBS_LOG_LEVEL: dbg
USE_PYTHON3: True
ENABLE_TLS: True
# TODO(mjozefcz): Stop compiling OVS modules when meter action in kernel
# will be released in Ubuntu Bionic.
# More info: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-December/048009.html
OVN_BUILD_MODULES: True
- job:

View File

@ -199,6 +199,10 @@
ENABLE_CHASSIS_AS_GW: true
OVN_L3_CREATE_PUBLIC_NETWORK: true
OVN_DBS_LOG_LEVEL: dbg
# TODO(mjozefcz): Stop compiling OVS modules when meter action in kernel
# will be released in Ubuntu Bionic.
# More info: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-December/048009.html
OVN_BUILD_MODULES: True
USE_PYTHON3: True
DOWNLOAD_DEFAULT_IMAGES: false
IMAGE_URLS: "http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img,https://cloud-images.ubuntu.com/releases/xenial/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img"
@ -260,6 +264,7 @@
s-object: false
s-proxy: false
tls-proxy: true
q-qos: true
- job:
name: neutron-ovn-tempest-ovs-master