getNetworksFromStore should not fail on inconsistent network state

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal 2016-02-11 03:54:12 -08:00
parent af569c179f
commit 799369da81

View file

@ -139,7 +139,8 @@ func (c *controller) getNetworksFromStore() ([]*network, error) {
ec := &endpointCnt{n: n} ec := &endpointCnt{n: n}
err = store.GetObject(datastore.Key(ec.Key()...), ec) err = store.GetObject(datastore.Key(ec.Key()...), ec)
if err != nil { if err != nil {
return nil, fmt.Errorf("could not find endpoint count key %s for network %s while listing: %v", datastore.Key(ec.Key()...), n.Name(), err) log.Warnf("could not find endpoint count key %s for network %s while listing: %v", datastore.Key(ec.Key()...), n.Name(), err)
continue
} }
n.Lock() n.Lock()