Merge pull request #27891 from mml/fed-nil-node

Automatic merge from submit-queue

Catch the case where we cannot find any nodes.
This commit is contained in:
k8s-merge-robot 2016-06-22 13:43:12 -07:00 committed by GitHub
commit db43b68640

View File

@ -659,6 +659,10 @@ func (kd *KubeDNS) getClusterZone() (string, error) {
}
}
if node == nil {
return "", fmt.Errorf("Could not find any nodes")
}
zone, ok := node.Annotations[unversioned.LabelZoneFailureDomain]
if !ok || zone == "" {
return "", fmt.Errorf("unknown cluster zone")