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

When running ScheduledJob with ConcurencyPolicy Replace the pods are left behind #30442

Closed
soltysh opened this issue Aug 11, 2016 · 1 comment
Labels
area/batch area/kubectl kind/bug Categorizes issue or PR as related to a bug.

Comments

@soltysh
Copy link
Contributor

soltysh commented Aug 11, 2016

I've created a ScheduledJobs as follows:

apiVersion: batch/v2alpha1
kind: ScheduledJob
metadata:
  name: test
spec:
  schedule: "*/1 * * * ?"
  concurrencyPolicy: Replace
  jobTemplate:
    spec:
      template:
        metadata:
          name: test
        spec:
          containers:
          - name: test
            image: gcr.io/google_containers/busybox:1.24
            command: ["sleep", "300"]
          restartPolicy: Never

This should replace an existing job with a new one upon next run, so it does the old job is being removed but not its pod. So after a while I have only one job (correct) and two pods (incorrect), one running the old job, the other the new one. I assume this is due to lack of server side deletion (#19054), since currently the job deletion logic is in JobReaper.

@janetkuo depending on timing either you or me need to fix this.
@erictune fyi

@soltysh
Copy link
Contributor Author

soltysh commented Aug 11, 2016

Currently working on it...

k8s-github-robot pushed a commit that referenced this issue Aug 14, 2016
Automatic merge from submit-queue

Remove pods along with jobs when Replace ConcurrentPolicy is set

Fixes #30442

This builds on #30327 and needs a bit more love in tests.

@janetkuo @erictune fyi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/batch area/kubectl kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants