From 663159e9acb93ea571e8aec0a687fcc16fd96dff Mon Sep 17 00:00:00 2001 From: Jana Radhakrishnan Date: Sat, 18 Jun 2016 19:16:51 -0700 Subject: [PATCH] Vendoring @ab62dd6bf06bf0 Signed-off-by: Jana Radhakrishnan --- hack/vendor.sh | 2 +- vendor/src/github.com/docker/libnetwork/network.go | 12 ++++++++++-- .../docker/libnetwork/networkdb/cluster.go | 6 ++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/hack/vendor.sh b/hack/vendor.sh index e1201f8dd5..49132999b3 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 13be89d1cf79760acae842a32ad8531567220286 +clone git github.com/docker/libnetwork ab62dd6bf06bf0637d66d529931b69a5544468cb clone git github.com/docker/go-events 39718a26497694185f8fb58a7d6f31947f3dc42d 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/network.go b/vendor/src/github.com/docker/libnetwork/network.go index 1bf003ebf3..6063ef085b 100644 --- a/vendor/src/github.com/docker/libnetwork/network.go +++ b/vendor/src/github.com/docker/libnetwork/network.go @@ -1099,14 +1099,22 @@ func (n *network) getSvcRecords(ep *endpoint) []etchosts.Record { n.Lock() defer n.Unlock() + if ep == nil { + return nil + } + var recs []etchosts.Record sr, _ := n.ctrlr.svcRecords[n.id] + epName := ep.Name() for h, ip := range sr.svcMap { - if ep != nil && strings.Split(h, ".")[0] == ep.Name() { + if strings.Split(h, ".")[0] == epName { + continue + } + if len(ip) == 0 { + log.Warnf("Found empty list of IP addresses for service %s on network %s (%s)", h, n.Name(), n.ID()) continue } - recs = append(recs, etchosts.Record{ Hosts: h, IP: ip[0].String(), diff --git a/vendor/src/github.com/docker/libnetwork/networkdb/cluster.go b/vendor/src/github.com/docker/libnetwork/networkdb/cluster.go index 165ba6e856..d984c101f6 100644 --- a/vendor/src/github.com/docker/libnetwork/networkdb/cluster.go +++ b/vendor/src/github.com/docker/libnetwork/networkdb/cluster.go @@ -397,6 +397,12 @@ func (nDB *NetworkDB) bulkSyncNode(networks []string, node string, unsolicited b return false } + // Do not bulk sync state which is in the + // process of getting deleted. + if entry.deleting { + return false + } + params := strings.Split(path[1:], "/") tEvent := TableEvent{ Type: TableEventTypeCreate,