mirror of https://github.com/kubernetes/kops.git
VFS: Be more lenient in List if ClusterVFS.find can't read the cluster
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 #917
This commit is contained in:
parent
95f39ccc32
commit
b67e805357
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue