Bug 1308826

Summary: [platformmanagement_public_596]Daemonset can't create pod on node which is unschedulable
Product: OKD Reporter: DeShuai Ma <dma>
Component: PodAssignee: Paul Weil <pweil>
Status: CLOSED CURRENTRELEASE QA Contact: DeShuai Ma <dma>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: agoldste, aos-bugs, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-19 13:54:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description DeShuai Ma 2016-02-16 08:52:38 UTC
Description of problem:
The unschedulable field of a node is not respected by the daemonset controller, it should create pod on node which even is unschedulable.

Version-Release number of selected component (if applicable):
openshift v1.1.2-276-gabe8291-dirty
kubernetes v1.2.0-origin
etcd 2.2.2+git

How reproducible:
Always

Steps to Reproduce:
1.Make node unschedulable
$ oadm manage-node ip-172-18-2-109 --schedulable=false
[root@ip-172-18-2-109 sample-app]# oc get node
NAME              LABELS                                   STATUS                     AGE
ip-172-18-2-109   kubernetes.io/hostname=ip-172-18-2-109   Ready,SchedulingDisabled   5h

2.Create a daemonset 
$ cat dm.yaml
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: hello-daemonset
spec:
  selector:
    name: hello-daemonset
  template:
    metadata:
      labels:
        name: hello-daemonset
    spec:
      containers:
      - image: openshift/hello-openshift
        imagePullPolicy: Always
        name: registry
        ports:
        - containerPort: 80
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
      serviceAccount: default
      terminationGracePeriodSeconds: 1
$ oc create -f dm.yaml -n dma

3.Check daemonset and pod
$ oc describe daemonset hello-daemonset -n dma
$ oc get pod -n dma

Actual results:
3.There is no new pod is create on unschedulable node
$ oc describe daemonset hello-daemonset -n dma
Name:		hello-daemonset
Image(s):	openshift/hello-openshift
Selector:	
Node-Selector:	<none>
Labels:		name=hello-daemonset
Desired Number of Nodes Scheduled: 0
Current Number of Nodes Scheduled: 0
Number of Nodes Misscheduled: 0
Pods Status:	0 Running / 0 Waiting / 0 Succeeded / 0 Failed
No events.

Expected results:
3.Daemonset should create pod on node which is unschedulable

Additional info:

Comment 1 Andy Goldstein 2016-02-16 15:49:30 UTC
2 things:

1) There is no need to specify a spec.selector in this instance. However, if you do, you need to use the "new" format:

  spec:
    selector:
      matchLabels:
        name: hello-daemonset

2) This is currently working as implemented. See:

https://github.com/kubernetes/kubernetes/issues/17297
https://github.com/kubernetes/kubernetes/pull/17318
https://github.com/kubernetes/kubernetes/issues/15310

Comment 2 Andy Goldstein 2016-02-16 17:53:16 UTC
Note, ultimately, the plan is to be able to have daemon sets place pods on unschedulable nodes. I would keep this New until upstream resolves the TODO and makes this work the way it's supposed to.

Comment 3 DeShuai Ma 2016-03-23 09:28:55 UTC
Andy, this bug have fixed on latest ose, could help set on_qa? thanks.

Comment 4 DeShuai Ma 2016-03-24 02:26:20 UTC
Test on openshift v3.2.0.6, it can schedule pod on node which is unschedulable
verify this bug.