Skip to content
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

Queue capability can overuse #834

Closed
zen-xu opened this issue May 26, 2020 · 4 comments
Closed

Queue capability can overuse #834

zen-xu opened this issue May 26, 2020 · 4 comments
Labels
area/scheduling 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.

Comments

@zen-xu
Copy link
Contributor

zen-xu commented May 26, 2020

/kind bug

What happened:

I have limited the queue capability, but all jobs can be scheduled!!!

1590466546(1)

queue1 capability is 2 CPU, but can run 3 jobs each with 1CPU

What you expected to happen:

Only 2 jobs can be scheduled

How to reproduce it (as minimally and precisely as possible):

---
apiVersion: scheduling.volcano.sh/v1beta1
kind: Queue
metadata:
  name: queue1
spec:
  weight: 1
  capability:
    cpu: 2
    memory: 4Gi
---
apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
  name: job1
  labels:
    volcano.sh/job-type: ElasticJob
spec:
  minAvailable: 1
  schedulerName: volcano
  queue: queue1
  tasks:
  - name: worker
    replicas: 1
    template:
      spec:
        securityContext:
          runAsUser: 1000
        terminationGracePeriodSeconds: 5
        containers:
        - image: ubuntu:16.04
          name: worker
          resources:
            requests:
              cpu: 1
              memory: 1Gi
          args: ["sleep", "1000"]
---
apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
  name: job2
  labels:
    volcano.sh/job-type: ElasticJob
spec:
  minAvailable: 1
  schedulerName: volcano
  queue: queue1
  tasks:
  - name: worker
    replicas: 1
    template:
      spec:
        securityContext:
          runAsUser: 1000
        terminationGracePeriodSeconds: 5
        containers:
        - image: ubuntu:16.04
          name: worker
          resources:
            requests:
              cpu: 1
              memory: 1Gi
          args: ["sleep", "1000"]
---
apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
  name: job3
  labels:
    volcano.sh/job-type: ElasticJob
spec:
  minAvailable: 1
  schedulerName: volcano
  queue: queue1
  tasks:
  - name: worker
    replicas: 1
    template:
      spec:
        securityContext:
          runAsUser: 1000
        terminationGracePeriodSeconds: 5
        containers:
        - image: ubuntu:16.04
          name: worker
          resources:
            requests:
              cpu: 1
              memory: 1Gi
          args: ["sleep", "1000"]

or replicas set 3

---
apiVersion: scheduling.volcano.sh/v1beta1
kind: Queue
metadata:
  name: queue1
spec:
  weight: 1
  capability:
    cpu: 2
    memory: 4Gi
---
apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
  name: job1
  labels:
    volcano.sh/job-type: ElasticJob
spec:
  minAvailable: 1
  schedulerName: volcano
  queue: queue1
  tasks:
  - name: worker
    replicas: 3
    template:
      spec:
        securityContext:
          runAsUser: 1000
        terminationGracePeriodSeconds: 5
        containers:
        - image: ubuntu:16.04
          name: worker
          resources:
            requests:
              cpu: 1
              memory: 1Gi
          args: ["sleep", "1000"]

Anything else we need to know?:

Environment:

  • Volcano Version:
    0.4
  • Kubernetes version (use kubectl version):
    v1.18.2
  • OS (e.g. from /etc/os-release):
    Ubuntu18.04
  • Kernel (e.g. uname -a):
    Linux 4.18.0-25-generic
@volcano-sh-bot volcano-sh-bot added the kind/bug Categorizes issue or PR as related to a bug. label May 26, 2020
@hzxuzhonghu
Copy link
Collaborator

cc @k82cn

@stale
Copy link

stale bot commented Aug 24, 2020

Hello 👋 Looks like there was no activity on this issue for last 90 days.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity for 60 days, this issue will be closed (we can always reopen an issue if we need!).

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 24, 2020
@hzxuzhonghu
Copy link
Collaborator

Duplicate with #921, fixed in v0.4.2

@zen-xu
Copy link
Contributor Author

zen-xu commented Sep 11, 2020

@hzxuzhonghu
I don't think #921 has fixed all this problem.
I have try to use v0.4.2, queue still can overuse when job specify with replicas case

---
apiVersion: scheduling.volcano.sh/v1beta1
kind: Queue
metadata:
  name: queue1
spec:
  weight: 1
  capability:
    cpu: 2
    memory: 4Gi
---
apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
  name: job1
  labels:
    volcano.sh/job-type: ElasticJob
spec:
  minAvailable: 1
  schedulerName: volcano
  queue: queue1
  tasks:
  - name: worker
    replicas: 3
    template:
      spec:
        securityContext:
          runAsUser: 1000
        terminationGracePeriodSeconds: 5
        containers:
        - image: ubuntu:16.04
          name: worker
          resources:
            requests:
              cpu: 1
              memory: 1Gi
          args: ["sleep", "1000"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/scheduling 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.
Projects
None yet
Development

No branches or pull requests

3 participants