volcano-sh / volcano-sh/volcano

Reclaim action push queue bugs, maybe cause the reclaiming reouces invalid

Open
#3,003 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug
Dominant language
Go
Stars
6k
Forks
1.5k
Avg merge
1d 12h
Merged PRs (30d)
32

Description

What happened:
Queue A shares some GPUs and CPUs resources with Queue B, and there are no resources for Queue A's jobs. However, the resources reclaiming became invalid. So I check the logs of volcano-scheduler, and the jobs that need resources don't go into the predicting node and evicting pods stage. There are some bugs that cause unexpected situations in the reclaim.go.

What you expected to happen:
Reclaim happen normally.

How to reproduce it (as minimally and precisely as possible):
The reason of this bug is there:

// Found "high" priority task to reclaim others
if tasks, found := preemptorTasks[job.UID]; !found || tasks.Empty() {
	continue
} else {
	task = tasks.Pop().(*api.TaskInfo)
}

if !ssn.Allocatable(queue, task) {
	klog.V(3).Infof("Queue <%s> is overused when considering task <%s>, ignore it.", queue.Name, task.Name)
	continue
}

if err := ssn.PrePredicateFn(task); err != nil {
	klog.V(3).Infof("PrePredicate for task %s/%s failed for: %v", task.Namespace, task.Name, err)
	continue
}

When ssn.Allocatable() check false or the preemtor's tasks are empty, continue immediately. The queue has multiple jobs the first job has no tasks and the others have preemptor tasks. The first job checking failed, and others' jobs are skipped. This is how the bug happens.

Anything else we need to know?:

Environment:

  • Volcano Version: lasted version
  • Kubernetes version (use kubectl version): v1.22.5-tke.8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in reclaim.go at the preemptorTasks, Allocatable, and PrePredicateFn branches shown in the report, then trace how jobs in the same queue are iterated. Reproduce the shared Queue A/Queue B case and inspect volcano-scheduler logs; done means later eligible jobs still reach predicting and pod eviction so reclaiming succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.