Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit b1ae883d3f8c35f9142966af7bf5278e7a10b268)
Signed-off-by: Tibor Vass <tibor@docker.com>
| ... | ... |
@@ -65,7 +65,7 @@ clone git github.com/RackSec/srslog 259aed10dfa74ea2961eddd1d9847619f6e98837 |
| 65 | 65 |
clone git github.com/imdario/mergo 0.2.1 |
| 66 | 66 |
|
| 67 | 67 |
#get libnetwork packages |
| 68 |
-clone git github.com/docker/libnetwork c7dc6dc476a5f00f9b28efebe591347dd64264fc |
|
| 68 |
+clone git github.com/docker/libnetwork 443b7be96fdf0ed8f65ec92953aa8df4f9a725dc |
|
| 69 | 69 |
clone git github.com/docker/go-events afb2b9f2c23f33ada1a22b03651775fdc65a5089 |
| 70 | 70 |
clone git github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 |
| 71 | 71 |
clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec |
| ... | ... |
@@ -726,6 +726,12 @@ func (sb *sandbox) restoreOslSandbox() error {
|
| 726 | 726 |
joinInfo := ep.joinInfo |
| 727 | 727 |
i := ep.iface |
| 728 | 728 |
ep.Unlock() |
| 729 |
+ |
|
| 730 |
+ if i == nil {
|
|
| 731 |
+ log.Errorf("error restoring endpoint %s for container %s", ep.Name(), sb.ContainerID())
|
|
| 732 |
+ continue |
|
| 733 |
+ } |
|
| 734 |
+ |
|
| 729 | 735 |
ifaceOptions = append(ifaceOptions, sb.osSbox.InterfaceOptions().Address(i.addr), sb.osSbox.InterfaceOptions().Routes(i.routes)) |
| 730 | 736 |
if i.addrv6 != nil && i.addrv6.IP.To16() != nil {
|
| 731 | 737 |
ifaceOptions = append(ifaceOptions, sb.osSbox.InterfaceOptions().AddressIPv6(i.addrv6)) |
| ... | ... |
@@ -245,6 +245,10 @@ func (c *controller) sandboxCleanup(activeSandboxes map[string]interface{}) {
|
| 245 | 245 |
ep = &endpoint{id: eps.Eid, network: n, sandboxID: sbs.ID}
|
| 246 | 246 |
} |
| 247 | 247 |
} |
| 248 |
+ if _, ok := activeSandboxes[sb.ID()]; ok && err != nil {
|
|
| 249 |
+ logrus.Errorf("failed to restore endpoint %s in %s for container %s due to %v", eps.Eid, eps.Nid, sb.ContainerID(), err)
|
|
| 250 |
+ continue |
|
| 251 |
+ } |
|
| 248 | 252 |
heap.Push(&sb.endpoints, ep) |
| 249 | 253 |
} |
| 250 | 254 |
|