From ba35c0fc295e5af64b91bac6e2a9546d834e8eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20J=C3=B3zefczyk?= Date: Wed, 29 Jan 2020 17:04:07 +0100 Subject: [PATCH] [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 Change-Id: I175511acef0e661bd1f282f37b1e528959c118a5 --- devstack/lib/ovn_agent | 9 +++++++-- zuul.d/tempest-multinode.yaml | 9 +++++++++ zuul.d/tempest-singlenode.yaml | 5 +++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/devstack/lib/ovn_agent b/devstack/lib/ovn_agent index 42bd05257bf..943dfd1e473 100644 --- a/devstack/lib/ovn_agent +++ b/devstack/lib/ovn_agent @@ -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" diff --git a/zuul.d/tempest-multinode.yaml b/zuul.d/tempest-multinode.yaml index 44cb5aa3488..d43ca416d5e 100644 --- a/zuul.d/tempest-multinode.yaml +++ b/zuul.d/tempest-multinode.yaml @@ -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: diff --git a/zuul.d/tempest-singlenode.yaml b/zuul.d/tempest-singlenode.yaml index d60f05fb292..944f08e0430 100644 --- a/zuul.d/tempest-singlenode.yaml +++ b/zuul.d/tempest-singlenode.yaml @@ -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