Skip to content

Commit

Permalink
fix bug for check PodPending (#1021)
Browse files Browse the repository at this point in the history
  • Loading branch information
wackxu authored and k8s-ci-robot committed Jun 3, 2019
1 parent b123a75 commit d0b973b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controller.v1/tensorflow/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ func (tc *TFController) pastBackoffLimit(tfjob *tfv1.TFJob, pods []*v1.Pod) (boo
}
for i := range pods {
po := pods[i]
if po.Status.Phase == v1.PodRunning || po.Status.Phase != v1.PodPending {
if po.Status.Phase == v1.PodRunning || po.Status.Phase == v1.PodPending {
for j := range po.Status.InitContainerStatuses {
stat := po.Status.InitContainerStatuses[j]
result += stat.RestartCount
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller.v1beta2/tensorflow/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ func (tc *TFController) pastBackoffLimit(tfjob *tfv1beta2.TFJob, pods []*v1.Pod)
}
for i := range pods {
po := pods[i]
if po.Status.Phase == v1.PodRunning || po.Status.Phase != v1.PodPending {
if po.Status.Phase == v1.PodRunning || po.Status.Phase == v1.PodPending {
for j := range po.Status.InitContainerStatuses {
stat := po.Status.InitContainerStatuses[j]
result += stat.RestartCount
Expand Down

0 comments on commit d0b973b

Please sign in to comment.