kubernetes-retired / kube-batch

A batch scheduler of kubernetes for high performance workload, e.g. AI/ML, BigData, HPC
Apache License 2.0
1.08k stars 264 forks source link

preemptor missing when preempting in same job #950

Closed lowang-bh closed 3 years ago

lowang-bh commented 3 years ago

This case should preempt two pods in same job with low priority

create(){
    kubectl apply -f - <<EOF
apiVersion: batch/v1
kind: Job
metadata:
  annotations:
    useKubeBatch: "true"
  name: preeptee
  namespace: default
spec:
  backoffLimit: 2
  completions: 2
  parallelism: 2
  ttlSecondsAfterFinished: 600  
  template:
    metadata:
      annotations:
        scheduling.k8s.io/group-name: group1
    spec:
      containers:
      - image: busybox
        imagePullPolicy: IfNotPresent
        name: busybox
        command: ['/bin/sh']
        args: ['-c', 'sleep 160']        
        resources:
          requests:
            cpu: 1000m
          #limits:
          #  nvidia.com/gpu: 3             
      restartPolicy: Never
      terminationGracePeriodSeconds: 5
      schedulerName: kube-batch
---
apiVersion: scheduling.incubator.k8s.io/v1alpha1
kind: PodGroup
metadata:
  name: group1
  namespace: default
spec:
  minMember: 1
  queue: default
EOF

    sleep 10
    kubectl apply -f - <<EOF
apiVersion: batch/v1
kind: Job
metadata:
  name: preeptor
  namespace: default
spec:
  backoffLimit: 2
  completions: 2
  parallelism: 2
  ttlSecondsAfterFinished: 600  
  template:
    metadata:
      annotations:
        scheduling.k8s.io/group-name: group1
    spec:
      containers:
      - image: busybox
        imagePullPolicy: IfNotPresent
        name: busybox
        command: ['/bin/sh']
        args: ['-c', 'sleep 120']        
        resources:
          requests:
            cpu: 1000m
      restartPolicy: Never
      terminationGracePeriodSeconds: 5
      schedulerName: kube-batch
      priorityClassName: high-priority
EOF
}

Is this a BUG REPORT or FEATURE REQUEST?: Bug report

Uncomment only one, leave it on its own line:

kind bug /kind feature

What happened:

What you expected to happen:

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

Anything else we need to know?:

Environment:

k8s-triage-robot commented 3 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 3 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 3 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-ci-robot commented 3 years ago

@k8s-triage-robot: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/kube-batch/issues/950#issuecomment-957309333): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues and PRs according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue or PR with `/reopen` >- Mark this issue or PR as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.