don't cross-pollinate RVs

pull/6/head
Daniel Smith 2016-02-01 10:50:44 -08:00
parent 26683fda29
commit 5d713bb6aa
1 changed files with 6 additions and 2 deletions

View File

@ -99,8 +99,12 @@ func (c *Repair) runOnce() error {
} }
ctx := api.WithNamespace(api.NewDefaultContext(), api.NamespaceAll) ctx := api.WithNamespace(api.NewDefaultContext(), api.NamespaceAll)
options := &api.ListOptions{ResourceVersion: latest.ObjectMeta.ResourceVersion} // We explicitly send no resource version, since the resource version
list, err := c.registry.ListServices(ctx, options) // of 'latest' is from a different collection, it's not comparable to
// the service collection. The caching layer keeps per-collection RVs,
// and this is proper, since in theory the collections could be hosted
// in separate etcd (or even non-etcd) instances.
list, err := c.registry.ListServices(ctx, nil)
if err != nil { if err != nil {
return fmt.Errorf("unable to refresh the service IP block: %v", err) return fmt.Errorf("unable to refresh the service IP block: %v", err)
} }