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