summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-08-17 09:41:50 +0000
committerGerrit Code Review <review@openstack.org>2018-08-17 09:41:50 +0000
commit73efac1c673122b2b4e4f058fddfe7be87ae48ad (patch)
tree02c1f4d4cc453e86e5c569e24bc31c64249b69d4
parentda3261e0e867e9f581c6c4458363bd11047eb9aa (diff)
parentf49931396dc267b6d2b2ebfabe576fb9d90ae647 (diff)
Merge "make qemu wrapper condtional"
-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