-
Notifications
You must be signed in to change notification settings - Fork 963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PG minresource has some problems after PR#1459 #2921
Comments
@shinytang6 |
Is it convenient to share the problem and fix pr at the community meeting this week? @lowang-bh |
1、job.MinAvailable =01.1、task.MinAvailable == 0webhook mutate set job.MinAvailable = sum(task.Replacas) 1.2、task.MinAvailable != 0webhook mutate set job.MinAvailable = sum(task.MinAvailable) 2、job.MinAvailable !=02.1、task.MinAvailable == 0
apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
name: minavailable-job
spec:
schedulerName: volcano
minAvailable: 4
tasks:
- replicas: 5
minAvailable: 2
name: "master"
template:
metadata:
name: master
spec:
containers:
- image: nginx
name: nginx
resources:
requests:
cpu: "1"
memory: "1Gi"
restartPolicy: OnFailure
- replicas: 3
minAvailable: 2
name: "work"
template:
metadata:
name: web
spec:
containers:
- image: nginx
name: nginx
resources:
requests:
cpu: "1"
memory: "1Gi"
restartPolicy: OnFailure 2.2、task.MinAvailable != 0user set job.MinAvailable and task.MinAvailable. webhook validate job.MinAvailable must equal to sum(task.MinAvailable) apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
name: minavailable-job
spec:
schedulerName: volcano
minAvailable: 5
tasks:
- replicas: 5
minAvailable: 2
name: "master"
template:
metadata:
name: master
spec:
containers:
- image: nginx
name: nginx
resources:
requests:
cpu: "1"
memory: "1Gi"
restartPolicy: OnFailure
- replicas: 3
minAvailable: 2
name: "work"
template:
metadata:
name: web
spec:
containers:
- image: nginx
name: nginx
resources:
requests:
cpu: "1"
memory: "1Gi"
restartPolicy: OnFailure Who can know job.minAvailable: 5 represents those pods |
Hello 👋 Looks like there was no activity on this issue for last 90 days. |
/remove lifecycle |
What happened:
volcano/pkg/controllers/job/job_controller_actions.go
Lines 782 to 796 in 2721275
There are many cases.
job.MinAvailable !=0, task.MinAvailable == 0: (job.MinAvailable<=sum(task.Replicas))
job.MinAvailable ==0, task.MinAvailable == 0: (job.MinAvailable==sum(task.Replicas))
job.MinAvailable ==0, task.MinAvailable != 0: (job.MinAvailable==sum(task.MinAvailable)<=sum(task.Replicas))
job.MinAvailable !=0, task.MinAvailable != 0:
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
):uname -a
):The text was updated successfully, but these errors were encountered: