Browse Source

Merge "make qemu wrapper condtional"

Zuul 8 months ago
parent
commit
73efac1c67
2 changed files with 21 additions and 11 deletions
  1. 20
    11
      devstack/libs/ovs-dpdk
  2. 1
    0
      devstack/settings

+ 20
- 11
devstack/libs/ovs-dpdk View File

@@ -145,16 +145,7 @@ EOF
145 145
 # ovs cleanup
146 146
 #
147 147
 
148
-function ovs_dpdk_db_cleanup {
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
148
+function cleanup_qemu_kvm_wrapper {
158 149
     if [ -e /usr/bin/kvm ]; then
159 150
         KVM_CMD="/usr/bin/kvm"
160 151
     elif [ -e /usr/bin/qemu-kvm ]; then
@@ -168,6 +159,21 @@ function ovs_dpdk_db_cleanup {
168 159
     if [ -e /usr/bin/qemu-system-x86_64.orig ]; then
169 160
             sudo mv /usr/bin/qemu-system-x86_64.orig /usr/bin/qemu-system-x86_64
170 161
     fi
162
+}
163
+
164
+function 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 633
     sudo cp $NETWORKING_OVS_DPDK_DIR/devstack/ovs-dpdk/ovs-dpdk-init /etc/init.d/ovs-dpdk
628 634
     type systemctl 2>&1 >/dev/null && sudo systemctl daemon-reload
629 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 641
     sudo chmod +x /etc/init.d/ovs-dpdk
633 642
     sudo service ovs-dpdk init

+ 1
- 0
devstack/settings View File

@@ -16,6 +16,7 @@ OVS_DPDK_RTE_LIBRTE_VHOST=${OVS_DPDK_RTE_LIBRTE_VHOST:-True}
16 16
 OVS_DPDK_VHOST_USER_DEBUG=${OVS_DPDK_VHOST_USER_DEBUG:-False}
17 17
 OVS_DPDK_BUILD_SHARED_LIB=${OVS_DPDK_BUILD_SHARED_LIB:-False}
18 18
 OVS_DPDK_CONFIG_RTE_LIBRTE_VHOST_NUMA=${OVS_DPDK_CONFIG_RTE_LIBRTE_VHOST_NUMA:-True}
19
+OVS_DPDK_USE_QEMU_KVM_WRAPPER=${OVS_DPDK_USE_QEMU_KVM_WRAPPER:-False}
19 20
 
20 21
 # ovs constants
21 22
 OVS_DB_CONF_DIR=/etc/openvswitch

Loading…
Cancel
Save