[docker-io/el6] patch from jpoimboe, to set up bridge networking on RHEL bz#1035436

Vincent Batts vbatts at fedoraproject.org
Wed Nov 27 19:01:00 UTC 2013


commit 0ad0b669e42b101b5aff29c5aaa0d5d6cf59b282
Author: Vincent Batts <vbatts at redhat.com>
Date:   Wed Nov 27 13:58:14 2013 -0500

    patch from jpoimboe, to set up bridge networking on RHEL
    bz#1035436

 docker-io.spec          |   13 ++++++++++++-
 docker-rhel-brctl.patch |   21 +++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/docker-io.spec b/docker-io.spec
index 665bb25..6917aa8 100644
--- a/docker-io.spec
+++ b/docker-io.spec
@@ -14,12 +14,13 @@
 
 Name:           docker-io
 Version:        0.7.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Automates deployment of containerized applications
 License:        ASL 2.0
 
 Patch0:         docker-0.7-remove-dotcloud-tar.patch
 Patch1:         docker-0.7-el6-docs.patch
+Patch2:         docker-rhel-brctl.patch
 URL:            http://www.docker.io
 # only x86_64 for now: https://github.com/dotcloud/docker/issues/136
 ExclusiveArch:  x86_64
@@ -46,6 +47,12 @@ Requires(preun): chkconfig
 %endif
 Requires:       lxc
 Requires:       tar
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=1035436
+%if 0%{?rhel} >= 6
+Requires:       bridge-utils
+%endif
+
 Provides:       lxc-docker = %{version}
 
 # https://bugzilla.redhat.com/show_bug.cgi?id=1034919
@@ -67,6 +74,7 @@ rm -rf vendor
 %patch0 -p1 -b docker-0.7-remove-dotcloud-tar.patch
 %if 0%{?rhel} >= 6
 %patch1 -p1 -b docker-0.7-el6-docs.patch
+%patch2 -p1 -b brctl
 %endif
 
 %build
@@ -150,6 +158,9 @@ exit 0
 %dir %{_sharedstatedir}/docker
 
 %changelog
+* Wed Nov 27 2013 Vincent Batts <vbatts at redhat.com> - 0.7.0-3
+- Patch how the bridge network is set up on RHEL (BZ #1035436)
+
 * Wed Nov 27 2013 Vincent Batts <vbatts at redhat.com> - 0.7.0-2
 - add libcgroup require (BZ #1034919)
 
diff --git a/docker-rhel-brctl.patch b/docker-rhel-brctl.patch
new file mode 100644
index 0000000..014f9c5
--- /dev/null
+++ b/docker-rhel-brctl.patch
@@ -0,0 +1,21 @@
+diff --git a/network.go b/network.go
+index 1397de0..ac00b43 100644
+--- a/network.go
++++ b/network.go
+@@ -10,6 +10,7 @@ import (
+ 	"github.com/dotcloud/docker/utils"
+ 	"log"
+ 	"net"
++	"os/exec"
+ 	"strconv"
+ 	"sync"
+ )
+@@ -149,7 +150,7 @@ func CreateBridgeIface(config *DaemonConfig) error {
+ 	}
+ 	utils.Debugf("Creating bridge %s with network %s", config.BridgeIface, ifaceAddr)
+ 
+-	if err := netlink.NetworkLinkAdd(config.BridgeIface, "bridge"); err != nil {
++	if err := exec.Command("brctl", "addbr", config.BridgeIface).Run(); err != nil {
+ 		return fmt.Errorf("Error creating bridge: %s", err)
+ 	}
+ 	iface, err := net.InterfaceByName(config.BridgeIface)


More information about the scm-commits mailing list