From 529f645883046aac5b0fd7e1b1851dc7f70ae93f Mon Sep 17 00:00:00 2001 From: Cong Phuoc Hoang Date: Thu, 24 Jan 2019 01:48:43 +0900 Subject: [PATCH] Delete virtual interface "ovs-system" before load openvswitch module When openvswitch module is loaded by modprobe in [1], if virtual interface "ovs-system" exists, it causes the error " modprobe: FATAL: Module openvswitch is in use." This patch will check "ovs-system" exists or not, then delete it before load openvswitch module. [1] https://github.com/openstack/neutron/blob/master/devstack/lib/ovs#L92 Change-Id: I750bd74d1d07a73b57924b84f3d8506e6063936c --- devstack/lib/ovs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/devstack/lib/ovs b/devstack/lib/ovs index 05a9042c6e3..337741b1eb7 100644 --- a/devstack/lib/ovs +++ b/devstack/lib/ovs @@ -88,6 +88,10 @@ function prepare_for_compilation { # reload_kernel_modules() - reload openvswitch kernel module function reload_kernel_modules { + local ovs_system=$(sudo ovs-dpctl dump-dps | grep ovs-system) + if [ -n "$ovs_system" ]; then + sudo ovs-dpctl del-dp ovs-system + fi sudo modprobe -r vport_geneve sudo modprobe -r openvswitch load_module openvswitch