Skip to content

Commit

Permalink
Don't mix RVs from different resources
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtek-t committed Feb 5, 2016
1 parent 67065b8 commit 31a6f90
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/registry/service/portallocator/controller/repair.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ func (c *Repair) runOnce() error {
}

ctx := api.WithNamespace(api.NewDefaultContext(), api.NamespaceAll)
options := &api.ListOptions{ResourceVersion: latest.ObjectMeta.ResourceVersion}
list, err := c.registry.ListServices(ctx, options)
// We explicitly send no resource version, since the resource version
// 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 {
return fmt.Errorf("unable to refresh the port block: %v", err)
}
Expand Down

0 comments on commit 31a6f90

Please sign in to comment.