Bug 1308826 - [platformmanagement_public_596]Daemonset can't create pod on node which is unschedulable
Summary: [platformmanagement_public_596]Daemonset can't create pod on node which is un...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Paul Weil
QA Contact: DeShuai Ma
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-16 08:52 UTC by DeShuai Ma
Modified: 2016-09-19 13:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-19 13:54:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


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