[ovs-dev] [PATCH ] debian: Fix bringup seq for OVSPort type of vlan.

Saurabh Mohan saurabh at cplanenetworks.com
Thu Oct 29 23:00:30 UTC 2015


Problem:
When the OVSPort is a vlan interface there is a sequencing issue when we try
to bring up the OVSBridge.
Consider the following configuration in /etc/network/interfaces

allow-ovs br-foo
iface br-foo inet static
    address 1.1.1.1
    netmask 255.255.255.0
    ovs_type OVSBridge
    ovs_ports eth1.2052

# Interface eth1.2052
allow-br-foo eth1.2052
iface eth1.2052 inet manual
    ovs_type OVSPort
    ovs_bridge br-foo
    bridge_name br-foo

If we run 'service openvswitch start' then we'd get the following errors.
2015-10-08T00:05:45.279Z|00019|bridge|WARN|could not open network device eth1.2052 (No such device)

Reason:
Due to the current sequence the script /etc/network/if-pre-up.d/openvswitch
with IF_OVS_TYPE=OVSPort is run prior to the script
/etc/network.if-pre-up.d/vlan which brings up the vlan interface eth1.2052.

saurabh at ubuntu-test:~$ run-parts --test /etc/network/if-pre-up.d/
/etc/network/if-pre-up.d//bridge
/etc/network/if-pre-up.d//ethtool
/etc/network/if-pre-up.d//openvswitch
/etc/network/if-pre-up.d//vlan
/etc/network/if-pre-up.d//wireless-tools
/etc/network/if-pre-up.d//wpasupplicant

Fix:
The fix is to order the openvswitch script to run after the other interface
scripts in /etc/network/if-pre-up.d/

Signed-off-by: Saurabh Mohan <saurabh at cplanenetworks.com>
---
 debian/openvswitch-switch.links | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/openvswitch-switch.links b/debian/openvswitch-switch.links
index cf58073..5c7b1f1 100644
--- a/debian/openvswitch-switch.links
+++ b/debian/openvswitch-switch.links
@@ -1,2 +1,2 @@
 usr/share/openvswitch/scripts/ifupdown.sh etc/network/if-post-down.d/openvswitch
-usr/share/openvswitch/scripts/ifupdown.sh etc/network/if-pre-up.d/openvswitch
+usr/share/openvswitch/scripts/ifupdown.sh etc/network/if-pre-up.d/z09_openvswitch
-- 
1.9.1




More information about the dev mailing list