On 10/29/2015 04:42 PM, Gurucharan Shetty wrote:
On Thu, Oct 29, 2015 at 4:00 PM, Saurabh Mohan
<saur...@cplanenetworks.com> wrote:
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@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 <saur...@cplanenetworks.com>
How about changing the name of ' /etc/network/if-pre-up.d//vlan' to
/etc/network/if-pre-up.d//a09_vlan ? :)
I understand the problem, but I am not very keen with the solution.
Someone else may come and say that they want to start after
openvswitch and hence change the name from z09_ to something else. One
option for you is to use openvswitch vlan device instead.
I picked this prefix to kind of put a stake in the ground for naming
under /etc/network/if-pre-up.d/; If u could suggest another convention
that would be preferable then we could use that instead.
If another component wanted to run after openvswitch then they could
name their script z10_xyz and won't have to change openvswitch's name.
I do however understand your concern with the proposed fix.
We are trying to stay agnostic to the underlay interface (eth, vlan,
bond...) and let the kernel handle it. Otherwise the controller would
have to be aware of the way each server connects to the underlay and
that may not be uniform.
Or some
other way to do this.
any suggestions?
---
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
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev