Explorar o código

Merge pull request #23721 from mrjana/vendor

Vendoring libnetwork @ab62dd6bf06bf0
Vincent Demeester %!s(int64=9) %!d(string=hai) anos
pai
achega
f480bda09f

+ 1 - 1
hack/vendor.sh

@@ -65,7 +65,7 @@ clone git github.com/RackSec/srslog 259aed10dfa74ea2961eddd1d9847619f6e98837
 clone git github.com/imdario/mergo 0.2.1
 clone git github.com/imdario/mergo 0.2.1
 
 
 #get libnetwork packages
 #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/docker/go-events 39718a26497694185f8fb58a7d6f31947f3dc42d
 clone git github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
 clone git github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
 clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
 clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec

+ 10 - 2
vendor/src/github.com/docker/libnetwork/network.go

@@ -1099,14 +1099,22 @@ func (n *network) getSvcRecords(ep *endpoint) []etchosts.Record {
 	n.Lock()
 	n.Lock()
 	defer n.Unlock()
 	defer n.Unlock()
 
 
+	if ep == nil {
+		return nil
+	}
+
 	var recs []etchosts.Record
 	var recs []etchosts.Record
 	sr, _ := n.ctrlr.svcRecords[n.id]
 	sr, _ := n.ctrlr.svcRecords[n.id]
+	epName := ep.Name()
 
 
 	for h, ip := range sr.svcMap {
 	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
 			continue
 		}
 		}
-
 		recs = append(recs, etchosts.Record{
 		recs = append(recs, etchosts.Record{
 			Hosts: h,
 			Hosts: h,
 			IP:    ip[0].String(),
 			IP:    ip[0].String(),

+ 6 - 0
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
 				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:], "/")
 			params := strings.Split(path[1:], "/")
 			tEvent := TableEvent{
 			tEvent := TableEvent{
 				Type:      TableEventTypeCreate,
 				Type:      TableEventTypeCreate,