Skip to content

Commit

Permalink
VFS: Be more lenient in List if ClusterVFS.find can't read the cluster
Browse files Browse the repository at this point in the history
I believe S3 eventual consistency doesn't really guarantee much here,
so a delete by one kops instance and a list by another could easily
generate this.

Fixes kubernetes#917
  • Loading branch information
zmerlynn committed Nov 17, 2016
1 parent 95f39cc commit b67e805
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/client/simple/vfsclientset/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ func (c *ClusterVFS) List(options k8sapi.ListOptions) (*api.ClusterList, error)
for _, clusterName := range names {
cluster, err := c.find(clusterName)
if err != nil {
return nil, err
glog.Warningf("cluster %q found in state store listing, but cannot be loaded: %v", clusterName, err)
continue
}

if cluster == nil {
return nil, fmt.Errorf("cluster not found %q", clusterName)
glog.Warningf("cluster %q found in state store listing, but doesn't exist now", clusterName)
continue
}

items = append(items, *cluster)
Expand Down

0 comments on commit b67e805

Please sign in to comment.