<p dir="auto">Writing this <a href="https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/network/kubenet/kubenet_linux.go#L158">https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/network/kubenet/kubenet_linux.go#L158</a> to filesystem allows us to share a single kubelet generated CNI config for all runtimes (eg rkt).  Potential downside is that we'd end up with 2 type=bridge cni confs that conflict.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/freehan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/freehan">@freehan</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dcbw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dcbw">@dcbw</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yifan-gu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yifan-gu">@yifan-gu</a></p>
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):<br>
No</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):<br>
<code class="notranslate">scheduledjob</code>, <code class="notranslate">cron</code>, <code class="notranslate">active</code></p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):<br>
BUG REPORT</p>

<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.6+coreos.0&quot;, GitCommit:&quot;ec2b52fabadf824a42b66b6729fe4cff2c62af8c&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-11-14T19:42:00Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate"><code class="notranslate">Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.6+coreos.0", GitCommit:"ec2b52fabadf824a42b66b6729fe4cff2c62af8c", GitTreeState:"clean", BuildDate:"2016-11-14T19:42:00Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}
</code></pre></div>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: bare metal</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): <code class="notranslate">Debian GNU/Linux 8 (jessie)</code></li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): <code class="notranslate">4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 GNU/Linux</code></li>
<li><strong>Install tools</strong>: <code class="notranslate">quay.io/coreos/hyperkube:v1.4.6_coreos.0</code>, deployed with <code class="notranslate">kargo</code></li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">I had a job corresponding to a scheduledjob running, and I deleted the job manually.</p>
<p dir="auto">The scheduledjob still shows as <code class="notranslate">ACTIVE: 1</code>. <code class="notranslate">describe</code> shows the job name under <code class="notranslate">active jobs</code> even though the job was deleted.</p>
<p dir="auto">The scheduledjob stays like this indefinitely, and never re-schedules a new job according to the cron description.</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">I expect the scheduledjob to pick up that the job was deleted, get into <code class="notranslate">ACTIVE: 0</code> again, and do not reference a deleted job under <code class="notranslate">active jobs</code>.</p>
<p dir="auto">In <a href="https://github.com/kubernetes/kubernetes/blob/release-1.4/pkg/controller/scheduledjob/controller.go#L127">https://github.com/kubernetes/kubernetes/blob/release-1.4/pkg/controller/scheduledjob/controller.go#L127</a>, there is no check that all the jobs for a scheduledjob still exist.</p>
<p dir="auto">Instead, we could go through the active list for each scheduledjob, and remove any job that does not exist anymore along with a warning event.</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<p dir="auto">Create:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apiVersion: batch/v2alpha1
kind: ScheduledJob
metadata:
  name: my-cron-job
  labels:
    app: my-cron-job
spec:
  schedule: 0/1 * * * ?
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: my-cron-job
            image: busybox:1.25
            command: [&quot;sleep&quot;, &quot;120&quot;]
          restartPolicy: Never"><pre class="notranslate"><code class="notranslate">apiVersion: batch/v2alpha1
kind: ScheduledJob
metadata:
  name: my-cron-job
  labels:
    app: my-cron-job
spec:
  schedule: 0/1 * * * ?
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: my-cron-job
            image: busybox:1.25
            command: ["sleep", "120"]
          restartPolicy: Never
</code></pre></div>
<p dir="auto">Use <code class="notranslate">kubectl get jobs --watch | grep my-cron-job</code> to wait for the job to be created, and delete it using <code class="notranslate">kubectl delete job &lt;xxxx&gt;</code>.</p>
<p dir="auto">Check that scheduledjob is still active:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kubectl describe scheduledjob my-cron-job                                                                                                                                                                                                                                                                                                                            
Name:  				my-cron-job
Namespace:     			default
Schedule:      			0/1 * * * ?
Concurrency Policy:    		Forbid
Suspend:       			False
Starting Deadline Seconds:     	&lt;unset&gt;
Image(s):      			busybox:1.25
Selector:      			&lt;unset&gt;
Parallelism:   			&lt;unset&gt;
Completions:   			&lt;unset&gt;
No volumes.
Labels:			app=my-cron-job
Last Schedule Time:    	Fri, 02 Dec 2016 11:22:00 -0500
Active Jobs:   		my-cron-job-1782155079
Events:
  FirstSeen    	LastSeen       	Count  	From   				SubobjectPath  	Type   		Reason 			Message
  ---------    	--------       	-----  	----   				-------------  	--------       	------ 			-------
  3m   		3m     		1      	{scheduled-job-controller }    			Normal 		SuccessfulCreate       	Created job my-cron-job-1782155079"><pre class="notranslate"><code class="notranslate">kubectl describe scheduledjob my-cron-job                                                                                                                                                                                                                                                                                                                            
Name:  				my-cron-job
Namespace:     			default
Schedule:      			0/1 * * * ?
Concurrency Policy:    		Forbid
Suspend:       			False
Starting Deadline Seconds:     	&lt;unset&gt;
Image(s):      			busybox:1.25
Selector:      			&lt;unset&gt;
Parallelism:   			&lt;unset&gt;
Completions:   			&lt;unset&gt;
No volumes.
Labels:			app=my-cron-job
Last Schedule Time:    	Fri, 02 Dec 2016 11:22:00 -0500
Active Jobs:   		my-cron-job-1782155079
Events:
  FirstSeen    	LastSeen       	Count  	From   				SubobjectPath  	Type   		Reason 			Message
  ---------    	--------       	-----  	----   				-------------  	--------       	------ 			-------
  3m   		3m     		1      	{scheduled-job-controller }    			Normal 		SuccessfulCreate       	Created job my-cron-job-1782155079
</code></pre></div>
<p dir="auto">Wait as long as you like and repeat check -- it will stay active indefinitely.</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p>