summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhu Venugopal <madhu@docker.com>2016-07-27 08:41:46 -0700
committerTibor Vass <tibor@docker.com>2016-07-27 14:55:30 -0700
commit29f6886e4836eb7f29e14c585eb2f9e4ec548bd0 (patch)
tree4fef6b3a8d4759a64e6929067077698e0d9fec8a
parent7f6a1d9fb78ca8c2fc312c1f24178acee57b1812 (diff)
downloaddocker-29f6886e4836eb7f29e14c585eb2f9e4ec548bd0.tar.gz
Vendoring libnetwork to fix #25109
Signed-off-by: Madhu Venugopal <madhu@docker.com> (cherry picked from commit b1ae883d3f8c35f9142966af7bf5278e7a10b268) Signed-off-by: Tibor Vass <tibor@docker.com>
-rwxr-xr-xhack/vendor.sh2
-rw-r--r--vendor/src/github.com/docker/libnetwork/sandbox.go6
-rw-r--r--vendor/src/github.com/docker/libnetwork/sandbox_store.go4
3 files changed, 11 insertions, 1 deletions
diff --git a/hack/vendor.sh b/hack/vendor.sh
index 7a4335a533..ed3ac5bf5c 100755
--- a/hack/vendor.sh
+++ b/hack/vendor.sh
@@ -65,7 +65,7 @@ clone git github.com/RackSec/srslog 259aed10dfa74ea2961eddd1d9847619f6e98837
clone git github.com/imdario/mergo 0.2.1
#get libnetwork packages
-clone git github.com/docker/libnetwork c7dc6dc476a5f00f9b28efebe591347dd64264fc
+clone git github.com/docker/libnetwork 443b7be96fdf0ed8f65ec92953aa8df4f9a725dc
clone git github.com/docker/go-events afb2b9f2c23f33ada1a22b03651775fdc65a5089
clone git github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
diff --git a/vendor/src/github.com/docker/libnetwork/sandbox.go b/vendor/src/github.com/docker/libnetwork/sandbox.go
index a4a8933e28..a0667b46aa 100644
--- a/vendor/src/github.com/docker/libnetwork/sandbox.go
+++ b/vendor/src/github.com/docker/libnetwork/sandbox.go
@@ -726,6 +726,12 @@ func (sb *sandbox) restoreOslSandbox() error {
joinInfo := ep.joinInfo
i := ep.iface
ep.Unlock()
+
+ if i == nil {
+ log.Errorf("error restoring endpoint %s for container %s", ep.Name(), sb.ContainerID())
+ continue
+ }
+
ifaceOptions = append(ifaceOptions, sb.osSbox.InterfaceOptions().Address(i.addr), sb.osSbox.InterfaceOptions().Routes(i.routes))
if i.addrv6 != nil && i.addrv6.IP.To16() != nil {
ifaceOptions = append(ifaceOptions, sb.osSbox.InterfaceOptions().AddressIPv6(i.addrv6))
diff --git a/vendor/src/github.com/docker/libnetwork/sandbox_store.go b/vendor/src/github.com/docker/libnetwork/sandbox_store.go
index 5b963e71c3..58a939c3ea 100644
--- a/vendor/src/github.com/docker/libnetwork/sandbox_store.go
+++ b/vendor/src/github.com/docker/libnetwork/sandbox_store.go
@@ -245,6 +245,10 @@ func (c *controller) sandboxCleanup(activeSandboxes map[string]interface{}) {
ep = &endpoint{id: eps.Eid, network: n, sandboxID: sbs.ID}
}
}
+ if _, ok := activeSandboxes[sb.ID()]; ok && err != nil {
+ logrus.Errorf("failed to restore endpoint %s in %s for container %s due to %v", eps.Eid, eps.Nid, sb.ContainerID(), err)
+ continue
+ }
heap.Push(&sb.endpoints, ep)
}