Skip to content

Commit

Permalink
correct bug of panic when podgroup is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
sivanzcw committed Apr 18, 2019
1 parent eebf1e5 commit 7a8b7a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/scheduler/framework/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ func (ssn *Session) UpdateJobCondition(jobInfo *api.JobInfo, cond *v1alpha1.PodG
return fmt.Errorf("failed to find job <%s/%s>", jobInfo.Namespace, jobInfo.Name)
}

if job.PodGroup == nil {
return nil
}

index := -1
for i, c := range job.PodGroup.Status.Conditions {
if c.Type == cond.Type {
Expand Down

0 comments on commit 7a8b7a0

Please sign in to comment.