[openvswitch] missed patch in commit 87a74a57, add it to really fix (#803843)
Chris Wright
chrisw at fedoraproject.org
Thu Mar 15 19:20:18 UTC 2012
commit 05a954efb2e5f08fe0a3b12bb9984d3cdb8eb51f
Author: Chris Wright <chrisw at sous-sol.org>
Date: Thu Mar 15 12:20:01 2012 -0700
missed patch in commit 87a74a57, add it to really fix (#803843)
openvswitch-rhel-initscripts-resync.patch | 210 +++++++++++++++++++++++++++++
1 files changed, 210 insertions(+), 0 deletions(-)
---
diff --git a/openvswitch-rhel-initscripts-resync.patch b/openvswitch-rhel-initscripts-resync.patch
new file mode 100644
index 0000000..2e0cce2
--- /dev/null
+++ b/openvswitch-rhel-initscripts-resync.patch
@@ -0,0 +1,210 @@
+From 26fbdf773f546f653d67f1bf022ff9021cefc062 Mon Sep 17 00:00:00 2001
+From: Gurucharan Shetty <gshetty at nicira.com>
+Date: Fri, 20 Jan 2012 15:07:50 -0800
+Subject: [PATCH] rhel: Correct an example in README.RHEL
+
+Change the value of OVS_BRIDGE in an example to point
+to the correct bridge name.
+
+Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
+---
+ rhel/README.RHEL | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/rhel/README.RHEL b/rhel/README.RHEL
+index e6617ab..3e682b3 100644
+--- a/rhel/README.RHEL
++++ b/rhel/README.RHEL
+@@ -70,7 +70,7 @@ DEVICE=eth0
+ ONBOOT=yes
+ DEVICETYPE=ovs
+ TYPE=OVSPort
+-OVS_BRIDGE=internet
++OVS_BRIDGE=ovsbridge0
+ BOOTPROTO=none
+ HOTPLUG=no
+
+--
+1.7.7.6
+
+From 5442edb9e0afb6fdc4cd81e5d1ebd3e0d4e6accf Mon Sep 17 00:00:00 2001
+From: Gurucharan Shetty <gshetty at nicira.com>
+Date: Mon, 30 Jan 2012 20:17:53 -0800
+Subject: [PATCH] rhel: Enable DHCP in redhat network scripts.
+
+The current network-script, ifup-ovs does not work well if you
+enable DHCP on the OVS. It will work if we name the bridge
+alphabetically greater than the underlying physical interfaces.
+Even then, it will do multiple DHCP attempts slowing down the boot
+up process.
+
+This patch allows DHCP on an OVS bridge.
+
+Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
+---
+ rhel/README.RHEL | 12 ++++++++++++
+ rhel/etc_sysconfig_network-scripts_ifup-ovs | 16 +++++++++++++++-
+ 2 files changed, 27 insertions(+), 1 deletions(-)
+
+diff --git a/rhel/README.RHEL b/rhel/README.RHEL
+index 3e682b3..b97fb6c 100644
+--- a/rhel/README.RHEL
++++ b/rhel/README.RHEL
+@@ -62,6 +62,18 @@ IPADDR=A.B.C.D
+ NETMASK=X.Y.Z.0
+ HOTPLUG=no
+
++Enable DHCP on the bridge:
++* Needs OVSBOOTPROTO instead of BOOTPROTO.
++* All the interfaces that can reach the DHCP server
++as a comma separated list in OVSDHCPINTERFACES.
++
++DEVICE=ovsbridge0
++ONBOOT=yes
++DEVICETYPE=ovs
++TYPE=OVSBridge
++OVSBOOTPROTO="dhcp"
++OVSDHCPINTERFACES="eth0"
++HOTPLUG=no
+
+ Adding physical eth0 to ovsbridge0 described above:
+
+diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs
+index 7074c07..18cebc4 100755
+--- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
++++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
+@@ -36,12 +36,25 @@ fi
+ case "$TYPE" in
+ OVSBridge)
+ ovs-vsctl -- --may-exist add-br "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+- ${OTHERSCRIPT} ${CONFIG} ${2}
++ if [ "${OVSBOOTPROTO}" = "dhcp" ] && [ -n "${OVSINTF}" ]; then
++ case ${OVSDHCPINTERFACES} in
++ ${OVSINTF#ifcfg-} | \
++ "${OVSINTF#ifcfg-},"* | \
++ *",${OVSINTF#ifcfg-}" | \
++ *",${OVSINTF#ifcfg-},"*)
++ BOOTPROTO=dhcp ${OTHERSCRIPT} ${CONFIG}
++ ;;
++ esac
++ fi
++ if [ "${OVSBOOTPROTO}" != "dhcp" ] && [ -z "${OVSINTF}" ]; then
++ ${OTHERSCRIPT} ${CONFIG}
++ fi
+ ;;
+ OVSPort)
+ /sbin/ifup "$OVS_BRIDGE"
+ ${OTHERSCRIPT} ${CONFIG} ${2}
+ ovs-vsctl -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
++ OVSINTF=${CONFIG} /sbin/ifup "$OVS_BRIDGE"
+ ;;
+ OVSIntPort)
+ /sbin/ifup "$OVS_BRIDGE"
+@@ -55,6 +68,7 @@ case "$TYPE" in
+ done
+ ovs-vsctl -- --fake-iface add-bond "$OVS_BRIDGE" "$DEVICE" ${BOND_IFACES} $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+ ${OTHERSCRIPT} ${CONFIG} ${2}
++ OVSINTF=${CONFIG} /sbin/ifup "$OVS_BRIDGE"
+ ;;
+ *)
+ echo $"Invalid OVS interface type $TYPE"
+--
+1.7.7.6
+
+From e31f6c5d1c26e9b86adb6449226b4f08f2c8d7a5 Mon Sep 17 00:00:00 2001
+From: Ben Pfaff <blp at nicira.com>
+Date: Fri, 3 Feb 2012 09:33:47 -0800
+Subject: [PATCH] rhel: Simplify ifup-ovs script use of "case".
+
+Suggested-by: "Alexey I. Froloff" <raorn at altlinux.org>
+Signed-off-by: Ben Pfaff <blp at nicira.com>
+---
+ rhel/etc_sysconfig_network-scripts_ifup-ovs | 7 ++-----
+ 1 files changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs
+index 18cebc4..4773ee4 100755
+--- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
++++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
+@@ -37,11 +37,8 @@ case "$TYPE" in
+ OVSBridge)
+ ovs-vsctl -- --may-exist add-br "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+ if [ "${OVSBOOTPROTO}" = "dhcp" ] && [ -n "${OVSINTF}" ]; then
+- case ${OVSDHCPINTERFACES} in
+- ${OVSINTF#ifcfg-} | \
+- "${OVSINTF#ifcfg-},"* | \
+- *",${OVSINTF#ifcfg-}" | \
+- *",${OVSINTF#ifcfg-},"*)
++ case ,${OVSDHCPINTERFACES}, in
++ *,${OVSINTF#ifcfg-},*)
+ BOOTPROTO=dhcp ${OTHERSCRIPT} ${CONFIG}
+ ;;
+ esac
+--
+1.7.7.6
+
+From b4b6a39ae688b88b2d17c0b47b105fed86f6c29d Mon Sep 17 00:00:00 2001
+From: Gurucharan Shetty <gshetty at nicira.com>
+Date: Fri, 3 Feb 2012 12:21:30 -0800
+Subject: [PATCH] rhel: Space separated list of DHCP interfaces in network
+ scripts.
+
+Use space separated list of DHCP interfaces for OVSDHCPINTERFACES
+instead of comma separated list. This is done to maintain
+consistency with BOND_IFACES.
+
+Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
+---
+ rhel/README.RHEL | 2 +-
+ rhel/etc_sysconfig_network-scripts_ifup-ovs | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/rhel/README.RHEL b/rhel/README.RHEL
+index b97fb6c..d9b68e4 100644
+--- a/rhel/README.RHEL
++++ b/rhel/README.RHEL
+@@ -65,7 +65,7 @@ HOTPLUG=no
+ Enable DHCP on the bridge:
+ * Needs OVSBOOTPROTO instead of BOOTPROTO.
+ * All the interfaces that can reach the DHCP server
+-as a comma separated list in OVSDHCPINTERFACES.
++as a space separated list in OVSDHCPINTERFACES.
+
+ DEVICE=ovsbridge0
+ ONBOOT=yes
+diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs
+index 4773ee4..b800ce0 100755
+--- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
++++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
+@@ -37,8 +37,8 @@ case "$TYPE" in
+ OVSBridge)
+ ovs-vsctl -- --may-exist add-br "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+ if [ "${OVSBOOTPROTO}" = "dhcp" ] && [ -n "${OVSINTF}" ]; then
+- case ,${OVSDHCPINTERFACES}, in
+- *,${OVSINTF#ifcfg-},*)
++ case " ${OVSDHCPINTERFACES} " in
++ *" ${OVSINTF} "*)
+ BOOTPROTO=dhcp ${OTHERSCRIPT} ${CONFIG}
+ ;;
+ esac
+@@ -51,7 +51,7 @@ case "$TYPE" in
+ /sbin/ifup "$OVS_BRIDGE"
+ ${OTHERSCRIPT} ${CONFIG} ${2}
+ ovs-vsctl -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+- OVSINTF=${CONFIG} /sbin/ifup "$OVS_BRIDGE"
++ OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE"
+ ;;
+ OVSIntPort)
+ /sbin/ifup "$OVS_BRIDGE"
+@@ -65,7 +65,7 @@ case "$TYPE" in
+ done
+ ovs-vsctl -- --fake-iface add-bond "$OVS_BRIDGE" "$DEVICE" ${BOND_IFACES} $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+ ${OTHERSCRIPT} ${CONFIG} ${2}
+- OVSINTF=${CONFIG} /sbin/ifup "$OVS_BRIDGE"
++ OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE"
+ ;;
+ *)
+ echo $"Invalid OVS interface type $TYPE"
+--
+1.7.7.6
+
More information about the scm-commits
mailing list