summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Mooney <work@seanmooney.info>2018-08-07 13:43:50 +0100
committerSean Mooney <work@seanmooney.info>2018-08-08 10:07:29 +0100
commitf49931396dc267b6d2b2ebfabe576fb9d90ae647 (patch)
tree5748052312d97b19ce115fa7cce155b7a9fe0724
parent8c1aa86354d805edeb3f16297df06e958309f42e (diff)
make qemu wrapper condtional
- The qemu wrapper has not been required for 2+ years since we nolonger support centos 6 or ubunut 12.04 - This change makes the qemu wrapper use conditional and off by default. - The qemu wrapper has been considerd legacy for some time and planned to be removed. As of this change the use of the wrapper is untested and considered deprecated. it will be removed in the stein release. Change-Id: Ic92cc6396f8908d194b53a9fbfc92be26c851f69
Notes
Notes (review): Code-Review+2: sean mooney <work@seanmooney.info> Workflow+1: sean mooney <work@seanmooney.info> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 17 Aug 2018 09:41:50 +0000 Reviewed-on: https://review.openstack.org/589767 Project: openstack/networking-ovs-dpdk Branch: refs/heads/master
-rw-r--r--devstack/libs/ovs-dpdk31
-rw-r--r--devstack/settings1
2 files changed, 21 insertions, 11 deletions
diff --git a/devstack/libs/ovs-dpdk b/devstack/libs/ovs-dpdk
index ef3db63..5d6eebc 100644
--- a/devstack/libs/ovs-dpdk
+++ b/devstack/libs/ovs-dpdk
@@ -145,16 +145,7 @@ EOF
145# ovs cleanup 145# ovs cleanup
146# 146#
147 147
148function ovs_dpdk_db_cleanup { 148function cleanup_qemu_kvm_wrapper {
149 # remove all OVS ports that look like Neutron created ports
150 for port in $(sudo ovs-vsctl list port | grep -o -e tap[0-9a-f\-]* -e q[rg]-[0-9a-f\-]*); do
151 sudo ovs-vsctl --no-wait del-port ${port}
152 done
153
154 # remove all OVS bridges created by Neutron
155 for bridge in $(sudo ovs-vsctl list-br | grep -o -e ${OVS_BRIDGE} -e ${PUBLIC_BRIDGE}); do
156 sudo ovs-vsctl --no-wait del-br ${bridge}
157 done
158 if [ -e /usr/bin/kvm ]; then 149 if [ -e /usr/bin/kvm ]; then
159 KVM_CMD="/usr/bin/kvm" 150 KVM_CMD="/usr/bin/kvm"
160 elif [ -e /usr/bin/qemu-kvm ]; then 151 elif [ -e /usr/bin/qemu-kvm ]; then
@@ -168,6 +159,21 @@ function ovs_dpdk_db_cleanup {
168 if [ -e /usr/bin/qemu-system-x86_64.orig ]; then 159 if [ -e /usr/bin/qemu-system-x86_64.orig ]; then
169 sudo mv /usr/bin/qemu-system-x86_64.orig /usr/bin/qemu-system-x86_64 160 sudo mv /usr/bin/qemu-system-x86_64.orig /usr/bin/qemu-system-x86_64
170 fi 161 fi
162}
163
164function ovs_dpdk_db_cleanup {
165 # remove all OVS ports that look like Neutron created ports
166 for port in $(sudo ovs-vsctl list port | grep -o -e tap[0-9a-f\-]* -e q[rg]-[0-9a-f\-]*); do
167 sudo ovs-vsctl --no-wait del-port ${port}
168 done
169
170 # remove all OVS bridges created by Neutron
171 for bridge in $(sudo ovs-vsctl list-br | grep -o -e ${OVS_BRIDGE} -e ${PUBLIC_BRIDGE}); do
172 sudo ovs-vsctl --no-wait del-br ${bridge}
173 done
174 if [ "${OVS_DPDK_USE_QEMU_KVM_WRAPPER}" == "True" ]; then
175 cleanup_qemu_kvm_wrapper
176 fi
171 177
172} 178}
173 179
@@ -627,7 +633,10 @@ function install_ovs_dpdk {
627 sudo cp $NETWORKING_OVS_DPDK_DIR/devstack/ovs-dpdk/ovs-dpdk-init /etc/init.d/ovs-dpdk 633 sudo cp $NETWORKING_OVS_DPDK_DIR/devstack/ovs-dpdk/ovs-dpdk-init /etc/init.d/ovs-dpdk
628 type systemctl 2>&1 >/dev/null && sudo systemctl daemon-reload 634 type systemctl 2>&1 >/dev/null && sudo systemctl daemon-reload
629 ovs_dpdk_write_conf 635 ovs_dpdk_write_conf
630 ovs_dpdk_create_kvm_wrapper 636
637 if [ "${OVS_DPDK_USE_QEMU_KVM_WRAPPER}" == "True" ]; then
638 ovs_dpdk_create_kvm_wrapper
639 fi
631 640
632 sudo chmod +x /etc/init.d/ovs-dpdk 641 sudo chmod +x /etc/init.d/ovs-dpdk
633 sudo service ovs-dpdk init 642 sudo service ovs-dpdk init
diff --git a/devstack/settings b/devstack/settings
index cf2ff3b..d327cb0 100644
--- a/devstack/settings
+++ b/devstack/settings
@@ -16,6 +16,7 @@ OVS_DPDK_RTE_LIBRTE_VHOST=${OVS_DPDK_RTE_LIBRTE_VHOST:-True}
16OVS_DPDK_VHOST_USER_DEBUG=${OVS_DPDK_VHOST_USER_DEBUG:-False} 16OVS_DPDK_VHOST_USER_DEBUG=${OVS_DPDK_VHOST_USER_DEBUG:-False}
17OVS_DPDK_BUILD_SHARED_LIB=${OVS_DPDK_BUILD_SHARED_LIB:-False} 17OVS_DPDK_BUILD_SHARED_LIB=${OVS_DPDK_BUILD_SHARED_LIB:-False}
18OVS_DPDK_CONFIG_RTE_LIBRTE_VHOST_NUMA=${OVS_DPDK_CONFIG_RTE_LIBRTE_VHOST_NUMA:-True} 18OVS_DPDK_CONFIG_RTE_LIBRTE_VHOST_NUMA=${OVS_DPDK_CONFIG_RTE_LIBRTE_VHOST_NUMA:-True}
19OVS_DPDK_USE_QEMU_KVM_WRAPPER=${OVS_DPDK_USE_QEMU_KVM_WRAPPER:-False}
19 20
20# ovs constants 21# ovs constants
21OVS_DB_CONF_DIR=/etc/openvswitch 22OVS_DB_CONF_DIR=/etc/openvswitch