Skip to content

suspend/resume 3 times vcjob will directly failure #3067

Description

@haiker2011

What happened:
Use vcjob create job, then job running, then suspend/resume 3 times, the vcjob will directly failure
What you expected to happen:
vcjob can success resume
How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

case v1alpha1.ResumeJobAction:
return KillJob(as.job, PodRetainPhaseSoft, func(status *vcbatch.JobStatus) bool {
status.State.Phase = vcbatch.Restarting
status.RetryCount++
return true
})

// Get the maximum number of retries.
maxRetry := ps.job.Job.Spec.MaxRetry
if status.RetryCount >= maxRetry {
// Failed is the phase that the job is restarted failed reached the maximum number of retries.
status.State.Phase = vcbatch.Failed
return true
}

when resume job, RetryCount++, and RetryCount >= maxRetry, job Failed

Environment:

  • Volcano Version: v1.7
  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

Metadata

Metadata

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions