Merge pull request #46019 from YuPengZTE/devAnalysePods

Automatic merge from submit-queue (batch tested with PRs 46450, 46272, 46453, 46019, 46367)

check err

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>



**What this PR does / why we need it**:
When the err in not nil, the podStatus is nil, it is dangerous "podStatus[cluster.Name].RunningAndReady".
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
This commit is contained in:
Kubernetes Submit Queue 2017-05-26 18:49:02 -07:00 committed by GitHub
commit b30ed6d7b8

View File

@ -452,6 +452,9 @@ func (frsc *ReplicaSetController) reconcileReplicaSet(key string) (reconciliatio
return statusError, err
}
podStatus, err := podanalyzer.AnalysePods(frs.Spec.Selector, allPods, time.Now())
if err != nil {
return statusError, err
}
current := make(map[string]int64)
estimatedCapacity := make(map[string]int64)
for _, cluster := range clusters {