[pve-devel] [PATCH] ifupdown.sh : add linux_ports to allow plug classic interfaces

Alexandre Derumier aderumier at odiso.com
Wed Dec 18 16:22:32 CET 2013


classic bonding with openvswitch
--------------------------------
auto bond0
iface bond0 inet manual
slaves eth0 eth1
bond_miimon 100
bond_mode active-backup

allow-ovs vmbr1
iface vmbr1 inet manual
    ovs_type OVSBridge
    linux_ports bond0

classic eth with openvswitch
--------------------------------
auto eth0
iface eth0 inet manual

allow-ovs vmbr1
iface vmbr1 inet manual
    ovs_type OVSBridge
    linux_ports eth0

openvswitch eth with openvswitch bridge
---------------------------------------
allow-ovs vmbr1
iface vmbr1 inet manual
    ovs_type OVSBridge
    ovs_ports eth0

allow-vmbr1 eth0
iface eth0 inet manual
    ovs_bridge vmbr1
    ovs_type OVSPort

openvswitch bond with openvswitch bridge
-----------------------------------------
allow-ovs vmbr1
iface vmbr1 inet static
    address 192.170.1.1
    netmask 255.255.255.0
    ovs_type OVSBridge
    ovs_ports bond0

allow-vmbr1 bond0
iface bond0 inet manual
    ovs_bridge vmbr1
    ovs_type OVSBond
    ovs_bonds eth0 eth1
    ovs_options bond_mode=active-backup

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 pvepatches/ifupdown.patch |   79 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 pvepatches/ifupdown.patch

diff --git a/pvepatches/ifupdown.patch b/pvepatches/ifupdown.patch
new file mode 100644
index 0000000..e607233
--- /dev/null
+++ b/pvepatches/ifupdown.patch
@@ -0,0 +1,79 @@
+From fa2f64a076e47d03d5669b82e13752bf585f11b2 Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <aderumier at odiso.com>
+Date: Wed, 18 Dec 2013 16:12:45 +0100
+Subject: [PATCH] ifupdown.sh : add linux_ports to allow plug classic
+ interfaces
+
+classic bonding with openvswitch
+--------------------------------
+auto bond0
+iface bond0 inet manual
+slaves eth0 eth1
+bond_miimon 100
+bond_mode active-backup
+
+allow-ovs vmbr1
+iface vmbr1 inet manual
+    ovs_type OVSBridge
+    linux_ports bond0
+
+classic eth with openvswitch
+--------------------------------
+auto eth0
+iface eth0 inet manual
+
+allow-ovs vmbr1
+iface vmbr1 inet manual
+    ovs_type OVSBridge
+    linux_ports eth0
+
+openvswitch eth with openvswitch bridge
+---------------------------------------
+allow-ovs vmbr1
+iface vmbr1 inet manual
+    ovs_type OVSBridge
+    ovs_ports eth0
+
+allow-vmbr1 eth0
+iface eth0 inet manual
+    ovs_bridge vmbr1
+    ovs_type OVSPort
+
+openvswitch bond with openvswitch bridge
+-----------------------------------------
+allow-ovs vmbr1
+iface vmbr1 inet static
+    address 192.170.1.1
+    netmask 255.255.255.0
+    ovs_type OVSBridge
+    ovs_ports bond0
+
+allow-vmbr1 bond0
+iface bond0 inet manual
+    ovs_bridge vmbr1
+    ovs_type OVSBond
+    ovs_bonds eth0 eth1
+    ovs_options bond_mode=active-backup
+
+Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
+---
+ debian/ifupdown.sh |    3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/debian/ifupdown.sh b/debian/ifupdown.sh
+index a621100..3ece942 100755
+--- a/debian/ifupdown.sh
++++ b/debian/ifupdown.sh
+@@ -40,6 +40,9 @@ if [ "${MODE}" = "start" ]; then
+                 if [ ! -z "${IF_OVS_PORTS}" ]; then
+                     ifup --allow="${IFACE}" ${IF_OVS_PORTS}
+                 fi
++                if [ ! -z "${IF_LINUX_PORTS}" ]; then
++                      ovs_vsctl -- --may-exist add-port "${IFACE}" "${IF_LINUX_PORTS}"
++                fi
+                 ;;
+         OVSPort)
+                 ovs_vsctl -- --may-exist add-port "${IF_OVS_BRIDGE}"\
+-- 
+1.7.10.4
+
-- 
1.7.10.4




More information about the pve-devel mailing list