From 6e50a77fc7412b2d0f5c6cf36c147d649cfb16a9 Mon Sep 17 00:00:00 2001 From: LIU Yulong Date: Fri, 23 Feb 2018 14:00:08 +0800 Subject: [PATCH] Try to enable L3 agent extension `fip_qos` Adds devstack configs to try to enable the L3 agent extension `fip_qos` by checking the API service extension router, agent and QoS. Once this L3 agent extension works during the devstack zuul job installation, we can continue to run the neutron-tempest-plugin tests for floating IP QoS. Partially-Implements blueprint: floating-ip-rate-limit Change-Id: Ibef48e7842a276fe77c901403d67760871f2b7e0 --- devstack/lib/l3_agent | 13 +++++++++++++ devstack/lib/qos | 4 ++++ devstack/plugin.sh | 7 +++++++ devstack/settings | 1 + 4 files changed, 25 insertions(+) create mode 100644 devstack/lib/l3_agent diff --git a/devstack/lib/l3_agent b/devstack/lib/l3_agent new file mode 100644 index 00000000000..080a91a576e --- /dev/null +++ b/devstack/lib/l3_agent @@ -0,0 +1,13 @@ +function plugin_agent_add_l3_agent_extension { + local l3_agent_extension=$1 + if [[ -z "$L3_AGENT_EXTENSIONS" ]]; then + L3_AGENT_EXTENSIONS=$l3_agent_extension + elif [[ ! ,${L3_AGENT_EXTENSIONS}, =~ ,${l3_agent_extension}, ]]; then + L3_AGENT_EXTENSIONS+=",$l3_agent_extension" + fi +} + + +function configure_l3_agent { + iniset $NEUTRON_L3_CONF agent extensions "$L3_AGENT_EXTENSIONS" +} diff --git a/devstack/lib/qos b/devstack/lib/qos index 2c5f0b4f817..9fb9cadefa9 100644 --- a/devstack/lib/qos +++ b/devstack/lib/qos @@ -18,3 +18,7 @@ function configure_qos { configure_qos_core_plugin configure_qos_l2_agent } + +function configure_l3_agent_extension_fip_qos { + plugin_agent_add_l3_agent_extension "fip_qos" +} diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 77488ce03dd..d26a929bf26 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -4,6 +4,7 @@ source $LIBDIR/dns source $LIBDIR/flavors source $LIBDIR/l2_agent source $LIBDIR/l2_agent_sriovnicswitch +source $LIBDIR/l3_agent source $LIBDIR/ml2 source $LIBDIR/qos source $LIBDIR/ovs @@ -63,6 +64,12 @@ if [[ "$1" == "stack" ]]; then configure_l2_agent configure_l2_agent_sriovnicswitch fi + if is_service_enabled q-l3 neutron-l3; then + if is_service_enabled q-qos neutron-qos; then + configure_l3_agent_extension_fip_qos + fi + configure_l3_agent + fi if [ $NEUTRON_CORE_PLUGIN = ml2 ]; then configure_ml2_extension_drivers fi diff --git a/devstack/settings b/devstack/settings index 88531f1e4df..3955b1554be 100644 --- a/devstack/settings +++ b/devstack/settings @@ -1,4 +1,5 @@ L2_AGENT_EXTENSIONS=${L2_AGENT_EXTENSIONS:-} +L3_AGENT_EXTENSIONS=${L3_AGENT_EXTENSIONS:-} if is_neutron_legacy_enabled; then NEUTRON_CORE_PLUGIN=$Q_PLUGIN