Bug 1320411

Summary: [infrastructure_public_284]Should not schedule pod without request on node which "allocatable" value is 0
Product: OKD Reporter: DeShuai Ma <dma>
Component: PodAssignee: Andy Goldstein <agoldste>
Status: CLOSED NOTABUG QA Contact: DeShuai Ma <dma>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, decarr, 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-03-23 13:42:52 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:

Description DeShuai Ma 2016-03-23 07:27:30 UTC
Description of problem:
When pod without request value, it still can be scheduled to node which "allocatable" value is 0.
Even there is another node has enough "allocatable" resouce, it sometime still can be scheduled to the node which "allocatable" value is 0
http://pastebin.test.redhat.com/359139

Version-Release number of selected component (if applicable):
openshift v3.2.0.6
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5

How reproducible:
Always

Steps to Reproduce:
1.Set node reserved to equal node's capacity
kubeletArguments:
  system-reserved:
    - "cpu=1,memory=2G"
  kube-reserved:
    - "cpu=1,memory=2G"

2.Check node allocatable
"allocatable": {
    "cpu": "0",
    "memory": "0",
    "pods": "110"
}

3.Create a pod without request
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/hello-openshift/hello-pod.json

4.Check pod status

Actual results:
4.It's running and be scheduled to node which cpu and memory is 0.

Expected results:
4.The pod should pending.

Additional info:

Comment 1 Andy Goldstein 2016-03-23 13:42:52 UTC
This is working as designed. Best effort pods (those with no request set) are allowed to land on a node regardless of its allocatable amount. Best effort pods do not cause allocatable to decrease.