PG minResource cal unreasonable,the minReq of minAvailable tasks only consider the order in yaml when the priority of tasks are same #3319
Labels
kind/bug
Categorizes issue or PR as related to a bug.
What happened:
If only have 2 GPU in cluster,pg would be pending,pod can not be created, yaml like this.
apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
name: testVcjob
spec:
minAvailable: 2
schedulerName: volcano
policies:
- event: PodEvicted
action: RestartJob
queue: default
tasks:
- replicas: 1
name: worker1
template:
spec:
containers:
- image: ubuntu:latest
command: ["sh", "-c","sleep 1000000"]
name: worker1
resources:
limits:
nvidia.com/gpu: "2"
requests:
nvidia.com/gpu: "2"
restartPolicy: Never
- replicas: 2
name: worker2
template:
spec:
containers:
- image: ubuntu:latest
command: ["sh", "-c","sleep 1000000"]
name: worker2
resources:
limits:
nvidia.com/gpu: "1"
requests:
nvidia.com/gpu: "1"
restartPolicy: Never
What you expected to happen:
pg minResource should be 2 NOT 3, cluster have 2 GPU, worker2 could be scheduled, so vcjob also could running
How to reproduce it (as minimally and precisely as possible):
acoording to the yaml, could reproduce,the logic in code(job_controller_action.go) onlly in order for same pripority tasks
Anything else we need to know?:
no
Environment:
kubectl version
): 1.28.2uname -a
):The text was updated successfully, but these errors were encountered: