minAvailable and dependsOn test question #2944
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
minAvailable and dependsOn test question
volcano version: master;test resource: 4C+4G
case 1
no_dependson_job.minAvailable<sum(task.minAvailable).yaml
result
(base) ~ kubectl get pods NAME READY STATUS RESTARTS AGE minavailable-job-master-0 1/1 Running 0 103s minavailable-job-master-1 1/1 Running 0 103s minavailable-job-master-2 0/1 Pending 0 103s minavailable-job-master-3 0/1 Pending 0 103s minavailable-job-master-4 0/1 Pending 0 103s minavailable-job-work-0 1/1 Running 0 103s minavailable-job-work-1 1/1 Running 0 103s minavailable-job-work-2 0/1 Pending 0 103s
analyse
when job.minAvailable<sum(task.minAvailable)=4+1,volcano execute allocate action,
CheckTaskReady job.minAvailable<sum(task.minAvailable) return true is inaccurate,The key code is as follows:
case 2
no_dependson_job.minAvailable=sum(task.minAvailable).yaml
result
I can run 4 pods locally. This task should be scheduled successfully, but the result is that the scheduling is unsuccessful.
analyse
job.minAvailable=sum(task.minAvailable)=3+1,The reason for the unsuccessful scheduling is that it is not scheduled according
to task.minAvailable. When scheduling, tasks need to be sorted, but minAvailable is not considered at present,
the sorting results are minavailable-job-master-0, 1 and minavailable-job-work-0, 1, and the scheduling result 2+2 is not equal to 3+1
solution
scheduler consider the minAvailable feature when sorting tasks
case 3
no_dependson_job.minAvailable>sum(task.minAvailable).yaml
result
analyse
Four pods are scheduled successfully, but 4<5(job.minAvailable) is unsuccessful. Although task.minAvailable is satisfied,
we should modify the webhook validate to not allow job.minAvailable>sum(task.minAvailable).
case 4
dependson_job.minAvailable=task.minAvailable.yaml
result
analyse
solution
The solution is to mark the dependsOn job. If the dependsOn job task does not create a pod, skip the check.
Anything else we need to know?:
test resource 4C/4G
Environment:
kubectl version
):uname -a
):The text was updated successfully, but these errors were encountered: