Skip to content

Commit

Permalink
Merge branch 'bugfix' into 'master'
Browse files Browse the repository at this point in the history
【Issue volcano-sh#60】修复问题:对于只创建pdb没有创建podgroup的对象,使用非kube-batch调度器会导致kube-batch panic

单号:  无

特性/模块名称: kube-batch

修改原因:

1. 如题,详情见issue
![image](/uploads/c8fd4f635155aae5f782e9a566f11b0a/image.png)
![image](/uploads/7c5ebdb529375743add2e82355c35a36/image.png)
![image](/uploads/20c86e680c7ba77d9ee7e2c610699cc4/image.png)

修改内容:

1. 增加nil判断

自验情况 自验通过
验证yaml [kubeflow-mpi.yaml](/uploads/952fa8dfab1ba26bd8d8560c8da1992c/kubeflow-mpi.yaml)

Issues info:
Issue ID: 60
Title: 对于只创建pdb没有创建podgroup的对象,使用非kube-batch调度器会导致kube-batch panic
Issue url: CBU-PaaS/Community/volcano/volcano#60


See merge request CBU-PaaS/Community/volcano/volcano!99
  • Loading branch information
mada 00483107 committed Apr 19, 2019
2 parents eebf1e5 + 7a8b7a0 commit 5ac003f
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 5ac003f

Please sign in to comment.