Bug 1308826 - [platformmanagement_public_596]Daemonset can't create pod on node which is unschedulable
[platformmanagement_public_596]Daemonset can't create pod on node which is un...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Kubernetes (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Paul Weil
DeShuai Ma
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-16 03:52 EST by DeShuai Ma
Modified: 2016-09-19 09:54 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-19 09:54:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description DeShuai Ma 2016-02-16 03:52:38 EST
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 10:49:30 EST
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 12:53:16 EST
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 05:28:55 EDT
Andy, this bug have fixed on latest ose, could help set on_qa? thanks.
Comment 4 DeShuai Ma 2016-03-23 22:26:20 EDT
Test on openshift v3.2.0.6, it can schedule pod on node which is unschedulable
verify this bug.

Note You need to log in before you can comment on or make changes to this bug.