Skip to content

Commit

Permalink
fix podgroup event and condition messages inconsistent
Browse files Browse the repository at this point in the history
Signed-off-by: rayoluo <[email protected]>
  • Loading branch information
rayoluo committed Jun 25, 2023
1 parent ed5c215 commit 2c0e901
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/scheduler/plugins/gang/gang.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

"volcano.sh/apis/pkg/apis/scheduling"
"volcano.sh/apis/pkg/apis/scheduling/v1beta1"

"volcano.sh/volcano/pkg/scheduler/api"
"volcano.sh/volcano/pkg/scheduler/framework"
"volcano.sh/volcano/pkg/scheduler/metrics"
Expand Down Expand Up @@ -178,7 +179,11 @@ func (gp *gangPlugin) OnSessionClose(ssn *framework.Session) {
}
return num + job.ReadyTaskNum()
}
unreadyTaskCount = job.MinAvailable - schedulableTaskNum()
if total := int32(len(job.Tasks)); job.MinAvailable > total {
unreadyTaskCount = total - schedulableTaskNum()
} else {
unreadyTaskCount = job.MinAvailable - schedulableTaskNum()
}
msg := fmt.Sprintf("%v/%v tasks in gang unschedulable: %v",
unreadyTaskCount, len(job.Tasks), job.FitError())
job.JobFitErrors = msg
Expand Down

0 comments on commit 2c0e901

Please sign in to comment.