Signed-off-by: Jana Radhakrishnan <mrjana@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 13be89d1cf79760acae842a32ad8531567220286 |
|
| 68 |
+clone git github.com/docker/libnetwork ab62dd6bf06bf0637d66d529931b69a5544468cb |
|
| 69 | 69 |
clone git github.com/docker/go-events 39718a26497694185f8fb58a7d6f31947f3dc42d |
| 70 | 70 |
clone git github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 |
| 71 | 71 |
clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec |
| ... | ... |
@@ -1099,14 +1099,22 @@ func (n *network) getSvcRecords(ep *endpoint) []etchosts.Record {
|
| 1099 | 1099 |
n.Lock() |
| 1100 | 1100 |
defer n.Unlock() |
| 1101 | 1101 |
|
| 1102 |
+ if ep == nil {
|
|
| 1103 |
+ return nil |
|
| 1104 |
+ } |
|
| 1105 |
+ |
|
| 1102 | 1106 |
var recs []etchosts.Record |
| 1103 | 1107 |
sr, _ := n.ctrlr.svcRecords[n.id] |
| 1108 |
+ epName := ep.Name() |
|
| 1104 | 1109 |
|
| 1105 | 1110 |
for h, ip := range sr.svcMap {
|
| 1106 |
- if ep != nil && strings.Split(h, ".")[0] == ep.Name() {
|
|
| 1111 |
+ if strings.Split(h, ".")[0] == epName {
|
|
| 1112 |
+ continue |
|
| 1113 |
+ } |
|
| 1114 |
+ if len(ip) == 0 {
|
|
| 1115 |
+ log.Warnf("Found empty list of IP addresses for service %s on network %s (%s)", h, n.Name(), n.ID())
|
|
| 1107 | 1116 |
continue |
| 1108 | 1117 |
} |
| 1109 |
- |
|
| 1110 | 1118 |
recs = append(recs, etchosts.Record{
|
| 1111 | 1119 |
Hosts: h, |
| 1112 | 1120 |
IP: ip[0].String(), |
| ... | ... |
@@ -397,6 +397,12 @@ func (nDB *NetworkDB) bulkSyncNode(networks []string, node string, unsolicited b |
| 397 | 397 |
return false |
| 398 | 398 |
} |
| 399 | 399 |
|
| 400 |
+ // Do not bulk sync state which is in the |
|
| 401 |
+ // process of getting deleted. |
|
| 402 |
+ if entry.deleting {
|
|
| 403 |
+ return false |
|
| 404 |
+ } |
|
| 405 |
+ |
|
| 400 | 406 |
params := strings.Split(path[1:], "/") |
| 401 | 407 |
tEvent := TableEvent{
|
| 402 | 408 |
Type: TableEventTypeCreate, |