diff --git a/SOURCES/flannel-Clarify-the-logging-when-VXLAN-interface-creation-fa.patch b/SOURCES/flannel-Clarify-the-logging-when-VXLAN-interface-creation-fa.patch new file mode 100644 index 0000000..12070ac --- /dev/null +++ b/SOURCES/flannel-Clarify-the-logging-when-VXLAN-interface-creation-fa.patch @@ -0,0 +1,27 @@ +From b3a68558eecd794d7d27af50e0afbc6736939c9e Mon Sep 17 00:00:00 2001 +From: "John W. Linville" +Date: Fri, 6 Mar 2015 14:49:20 -0500 +Subject: [PATCH] Clarify the logging when VXLAN interface creation fails + +--- + backend/vxlan/vxlan.go | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/backend/vxlan/vxlan.go b/backend/vxlan/vxlan.go +index fb0c91f201fa..a6fa77905440 100644 +--- a/backend/vxlan/vxlan.go ++++ b/backend/vxlan/vxlan.go +@@ -79,7 +79,8 @@ func (vb *VXLANBackend) Init(extIface *net.Interface, extIP net.IP) (*backend.Su + if err == nil { + break + } else { +- log.Warning("Failed to create VXLAN interface, retrying...") ++ log.Error("VXLAN init: ", err) ++ log.Info("Retrying in 1 second...") + + // wait 1 sec before retrying + time.Sleep(1*time.Second) +-- +2.1.0 + + diff --git a/SOURCES/flannel-vxlan-create-retry.patch b/SOURCES/flannel-vxlan-create-retry.patch new file mode 100644 index 0000000..5a679ad --- /dev/null +++ b/SOURCES/flannel-vxlan-create-retry.patch @@ -0,0 +1,46 @@ +From e246b8a9f6837ae6466c5822ede2e92b157e2d6a Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Sun, 8 Mar 2015 21:15:43 +0100 +Subject: [PATCH] flannel-vxlan-create-retry.patch + +Original author is John W. Linville. I have updated the patch to fit for rhel. + +--- + backend/vxlan/vxlan.go | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/backend/vxlan/vxlan.go b/backend/vxlan/vxlan.go +index 93977b4..d50f520 100644 +--- a/backend/vxlan/vxlan.go ++++ b/backend/vxlan/vxlan.go +@@ -5,6 +5,7 @@ import ( + "fmt" + "net" + "sync" ++ "time" + + log "github.com/coreos/flannel/Godeps/_workspace/src/github.com/golang/glog" + "github.com/coreos/flannel/Godeps/_workspace/src/github.com/vishvananda/netlink" +@@ -73,9 +74,16 @@ func (vb *VXLANBackend) Init(extIface *net.Interface, extIP net.IP, ipMasq bool) + } + + var err error +- vb.dev, err = newVXLANDevice(&devAttrs) +- if err != nil { +- return nil, err ++ for { ++ vb.dev, err = newVXLANDevice(&devAttrs) ++ if err == nil { ++ break ++ } else { ++ log.Warning("Failed to create VXLAN interface, retrying...") ++ ++ // wait 1 sec before retrying ++ time.Sleep(1*time.Second) ++ } + } + + sa, err := newSubnetAttrs(extIP, vb.dev.MACAddr()) +-- +1.9.3 + diff --git a/SOURCES/flanneld.service b/SOURCES/flanneld.service index da6439c..5b64a36 100644 --- a/SOURCES/flanneld.service +++ b/SOURCES/flanneld.service @@ -7,7 +7,7 @@ Before=docker.service Type=notify EnvironmentFile=/etc/sysconfig/flanneld EnvironmentFile=-/etc/sysconfig/docker-network -ExecStart=/usr/bin/flanneld -etcd-endpoints=${FLANNEL_ETCD} -etcd-prefix=${FLANNEL_ETCD_KEY} ${FLANNEL_OPTIONS} +ExecStart=/usr/bin/flanneld -etcd-endpoints=${FLANNEL_ETCD} -etcd-prefix=${FLANNEL_ETCD_KEY} $FLANNEL_OPTIONS ExecStartPost=/usr/libexec/flannel/mk-docker-opts.sh -k DOCKER_NETWORK_OPTIONS -d /run/flannel/docker [Install] diff --git a/SPECS/flannel.spec b/SPECS/flannel.spec index 3e48b7e..1539c50 100644 --- a/SPECS/flannel.spec +++ b/SPECS/flannel.spec @@ -9,7 +9,7 @@ Name: flannel Version: 0.2.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Etcd address management agent for overlay networks License: ASL 2.0 URL: https://%{import_path} @@ -21,6 +21,9 @@ Source3: flannel-docker.conf Source4: mk-docker-opts.sh ExclusiveArch: %{ix86} x86_64 %{arm} +Patch0: flannel-vxlan-create-retry.patch +Patch1: flannel-Clarify-the-logging-when-VXLAN-interface-creation-fa.patch + BuildRequires: golang >= 1.2.7 BuildRequires: pkgconfig(systemd) Requires: systemd @@ -35,6 +38,8 @@ that need to communicate with one another. %prep %setup -q -n %{repo}-%{version} +%patch0 -p1 +%patch1 -p1 %build ./build @@ -66,6 +71,13 @@ install -D -p -m 755 %{SOURCE4} %{buildroot}%{_libexecdir}/flannel/mk-docker-opt %config(noreplace) %{_sysconfdir}/sysconfig/flanneld %changelog +* Sun Mar 08 2015 jchaloup - 0.2.0-7 +- flanneld fails to start on boot + resolves: #1184579 + +* Thu Mar 5 2015 Eric Paris +- remove {} around FLANNEL_OPTIONS so you can use more than 1 + * Fri Jan 30 2015 jchaloup - 0.2.0-6 - remove devel subpackage