Bug 1275001

Summary: With project request template with quota/limit range, error creating new projects (although project successfully created)
Product: OpenShift Container Platform Reporter: Erik M Jacobs <ejacobs>
Component: NodeAssignee: David Eads <deads>
Status: CLOSED CURRENTRELEASE QA Contact: Jianwei Hou <jhou>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: aos-bugs, ejacobs, jliggitt, jokerman, mmccomas, sdodson
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: 2015-11-23 14:43:38 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 Erik M Jacobs 2015-10-24 18:43:10 UTC
[joe@ose3-master ~]$ oc version
oc v3.0.2.903
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

atomic-openshift-3.0.2.903-0.git.0.a4ff36b.el7aos.x86_64
atomic-openshift-clients-3.0.2.903-0.git.0.a4ff36b.el7aos.x86_64
atomic-openshift-master-3.0.2.903-0.git.0.a4ff36b.el7aos.x86_64
atomic-openshift-node-3.0.2.903-0.git.0.a4ff36b.el7aos.x86_64
atomic-openshift-sdn-ovs-3.0.2.903-0.git.0.a4ff36b.el7aos.x86_64
tuned-profiles-atomic-openshift-node-3.0.2.903-0.git.0.a4ff36b.el7aos.x86_64

[joe@ose3-master ~]$ oc new-project demo --display-name='OpenShift 3 Demo' --description='This is the first demo project with OpenShift v3' --loglevel=8 | gist
I1024 14:38:55.861235   12244 debugging.go:99] GET https://ose3-master.example.com:8443/api
I1024 14:38:55.861273   12244 debugging.go:106] Request Headers:
I1024 14:38:55.861277   12244 debugging.go:109]     User-Agent: oc/v1.2.0 (linux/amd64) kubernetes/4c8e6f4
I1024 14:38:55.861280   12244 debugging.go:109]     Authorization: Bearer 2BR3kOAdrDmglEfKM2v7a5ZwbQ5FyMNxf839UH_4oEY
I1024 14:38:55.884184   12244 debugging.go:124] Response Status: 200 OK in 22 milliseconds
I1024 14:38:55.884233   12244 debugging.go:127] Response Headers:
I1024 14:38:55.884240   12244 debugging.go:130]     Content-Type: application/json
I1024 14:38:55.884243   12244 debugging.go:130]     Date: Sat, 24 Oct 2015 18:38:55 GMT
I1024 14:38:55.884246   12244 debugging.go:130]     Content-Length: 32
I1024 14:38:55.884251   12244 debugging.go:130]     Cache-Control: no-store
I1024 14:38:55.884384   12244 request.go:777] Response Body: {
  "versions": [
    "v1"
  ]
}
I1024 14:38:55.886079   12244 debugging.go:99] GET https://ose3-master.example.com:8443/oapi
I1024 14:38:55.886087   12244 debugging.go:106] Request Headers:
I1024 14:38:55.886091   12244 debugging.go:109]     User-Agent: oc/v3.0.2.903 (linux/amd64) openshift/a4ff36b
I1024 14:38:55.886094   12244 debugging.go:109]     Authorization: Bearer 2BR3kOAdrDmglEfKM2v7a5ZwbQ5FyMNxf839UH_4oEY
I1024 14:38:55.888440   12244 debugging.go:124] Response Status: 200 OK in 2 milliseconds
I1024 14:38:55.888455   12244 debugging.go:127] Response Headers:
I1024 14:38:55.888459   12244 debugging.go:130]     Date: Sat, 24 Oct 2015 18:38:55 GMT
I1024 14:38:55.888463   12244 debugging.go:130]     Content-Length: 32
I1024 14:38:55.888466   12244 debugging.go:130]     Cache-Control: no-store
I1024 14:38:55.888469   12244 debugging.go:130]     Content-Type: application/json
I1024 14:38:55.888482   12244 request.go:777] Response Body: {
  "versions": [
    "v1"
  ]
}
I1024 14:38:55.888781   12244 debugging.go:99] GET https://ose3-master.example.com:8443/oapi/v1/projectrequests
I1024 14:38:55.888787   12244 debugging.go:106] Request Headers:
I1024 14:38:55.888790   12244 debugging.go:109]     User-Agent: oc/v3.0.2.903 (linux/amd64) openshift/a4ff36b
I1024 14:38:55.888793   12244 debugging.go:109]     Authorization: Bearer 2BR3kOAdrDmglEfKM2v7a5ZwbQ5FyMNxf839UH_4oEY
I1024 14:38:55.891834   12244 debugging.go:124] Response Status: 200 OK in 3 milliseconds
I1024 14:38:55.891850   12244 debugging.go:127] Response Headers:
I1024 14:38:55.891854   12244 debugging.go:130]     Date: Sat, 24 Oct 2015 18:38:55 GMT
I1024 14:38:55.891858   12244 debugging.go:130]     Content-Length: 69
I1024 14:38:55.891861   12244 debugging.go:130]     Cache-Control: no-store
I1024 14:38:55.891865   12244 debugging.go:130]     Content-Type: application/json
I1024 14:38:55.891880   12244 request.go:777] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success"}
I1024 14:38:55.892164   12244 request.go:524] Request Body: {"kind":"ProjectRequest","apiVersion":"v1","metadata":{"name":"demo","creationTimestamp":null},"displayName":"OpenShift 3 Demo","description":"This is 
the first demo project with OpenShift v3"}
I1024 14:38:55.892185   12244 debugging.go:99] POST https://ose3-master.example.com:8443/oapi/v1/projectrequests
I1024 14:38:55.892189   12244 debugging.go:106] Request Headers:
I1024 14:38:55.892192   12244 debugging.go:109]     User-Agent: oc/v3.0.2.903 (linux/amd64) openshift/a4ff36b
I1024 14:38:55.892195   12244 debugging.go:109]     Authorization: Bearer 2BR3kOAdrDmglEfKM2v7a5ZwbQ5FyMNxf839UH_4oEY
I1024 14:38:56.185544   12244 debugging.go:124] Response Status: 500 Internal Server Error in 293 milliseconds
I1024 14:38:56.185563   12244 debugging.go:127] Response Headers:
I1024 14:38:56.185567   12244 debugging.go:130]     Cache-Control: no-store
I1024 14:38:56.185571   12244 debugging.go:130]     Content-Type: application/json
I1024 14:38:56.185574   12244 debugging.go:130]     Date: Sat, 24 Oct 2015 18:38:56 GMT
I1024 14:38:56.185577   12244 debugging.go:130]     Content-Length: 852
I1024 14:38:56.185602   12244 request.go:777] Response Body: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "Internal error occurred: [ResourceQuota in version v1beta3 cannot be handled as a ResourceQuota: The apiVersion in the data (v1beta3) does not match the specified apiVersion(v1), LimitRange in vers
ion v1beta3 cannot be handled as a LimitRange: The apiVersion in the data (v1beta3) does not match the specified apiVersion(v1)]",
  "reason": "InternalError",
  "details": {
    "causes": [
      {
        "message": "[ResourceQuota in version v1beta3 cannot be handled as a ResourceQuota: The apiVersion in the data (v1beta3) does not match the specified apiVersion(v1), LimitRange in version v1beta3 cannot 
be handled as a LimitRange: The apiVersion in the data (v1beta3) does not match the specified apiVersion(v1)]"
      }
    ]
  },
  "code": 500
}
I1024 14:38:56.185837   12244 helpers.go:142] server response object: [{
  "metadata": {},
  "status": "Failure",
  "message": "Internal error occurred: [ResourceQuota in version v1beta3 cannot be handled as a ResourceQuota: The apiVersion in the data (v1beta3) does not match the specified apiVersion(v1), LimitRange in vers
ion v1beta3 cannot be handled as a LimitRange: The apiVersion in the data (v1beta3) does not match the specified apiVersion(v1)]",
  "reason": "InternalError",
  "details": {
    "causes": [
      {
        "message": "[ResourceQuota in version v1beta3 cannot be handled as a ResourceQuota: The apiVersion in the data (v1beta3) does not match the specified apiVersion(v1), LimitRange in version v1beta3 cannot 
be handled as a LimitRange: The apiVersion in the data (v1beta3) does not match the specified apiVersion(v1)]"
      }
    ]
  },
  "code": 500
}]
F1024 14:38:56.185858   12244 helpers.go:96] Error from server: Internal error occurred: [ResourceQuota in version v1beta3 cannot be handled as a ResourceQuota: The apiVersion in the data (v1beta3) does not match the specified apiVersion(v1), LimitRange in version v1beta3 cannot be handled as a LimitRange: The apiVersion in the data (v1beta3) does not match the specified apiVersion(v1)]


But the resourcequota and limitrange don't appear to be "v1beta3":

apiVersion: v1
kind: Template
metadata:
  creationTimestamp: 2015-10-24T18:25:22Z
  name: default-project-request
  namespace: default
  resourceVersion: "539"
  selfLink: /oapi/v1/namespaces/default/templates/default-project-request
  uid: 965f9ff2-7a7c-11e5-be87-525400b33d1d
objects:
- apiVersion: v1
  kind: Project
  metadata:
    annotations:
      openshift.io/description: ${PROJECT_DESCRIPTION}
      openshift.io/display-name: ${PROJECT_DISPLAYNAME}
    creationTimestamp: null
    name: ${PROJECT_NAME}
  spec: {}
  status: {}
- apiVersion: v1
  kind: ResourceQuota
  metadata:
    name: ${PROJECT_NAME}-quota
  spec:
    hard:
      cpu: 200m
      memory: 512Mi
      pods: 3
      replicationcontrollers: 3
      resourcequotas: 1
      services: 3
- apiVersion: v1
  kind: LimitRange
  metadata:
    creationTimestamp: null
    name: ${PROJECT_NAME}-limits
  spec:
    limits:
    - max:
        cpu: 500m
        memory: 750Mi
      min:
        cpu: 10m
        memory: 5Mi
      type: Pod
    - default:
        cpu: 100m
        memory: 100Mi
      max:
        cpu: 500m
        memory: 750Mi
      min:
        cpu: 10m
        memory: 5Mi
      type: Container
- apiVersion: v1
  groupNames: []
  kind: RoleBinding
  metadata:
    creationTimestamp: null
    name: admins
    namespace: ${PROJECT_NAME}
  roleRef:
    name: admin
  subjects:
  - kind: User
    name: ${PROJECT_ADMIN_USER}
  userNames:
  - ${PROJECT_ADMIN_USER}
- apiVersion: v1
  groupNames:
  - system:serviceaccounts:${PROJECT_NAME}
  kind: RoleBinding
  metadata:
    creationTimestamp: null
    name: system:image-pullers
    namespace: ${PROJECT_NAME}
  roleRef:
    name: system:image-puller
  subjects:
  - kind: SystemGroup
    name: system:serviceaccounts:${PROJECT_NAME}
  userNames: []
- apiVersion: v1
  groupNames: []
  kind: RoleBinding
  metadata:
    creationTimestamp: null
    name: system:image-builders
    namespace: ${PROJECT_NAME}
  roleRef:
    name: system:image-builder
  subjects:
  - kind: ServiceAccount
    name: builder
  userNames:
  - system:serviceaccount:${PROJECT_NAME}:builder
- apiVersion: v1
  groupNames: []
  kind: RoleBinding
  metadata:
    creationTimestamp: null
    name: system:deployers
    namespace: ${PROJECT_NAME}
  roleRef:
    name: system:deployer
  subjects:
  - kind: ServiceAccount
    name: deployer
  userNames:
  - system:serviceaccount:${PROJECT_NAME}:deployer
parameters:
- name: PROJECT_NAME
- name: PROJECT_DISPLAYNAME
- name: PROJECT_DESCRIPTION
- name: PROJECT_ADMIN_USER

The project is successfully created, but no limitrange or quota are created...

Comment 2 Jordan Liggitt 2015-10-26 14:09:22 UTC
What does this show?
`oc get templates default-project-request -n default -o json --loglevel=8`

Comment 3 Erik M Jacobs 2015-10-27 07:04:00 UTC
[root@ose3-master training]# oc get templates default-project-request -n default -o json --loglevel=8
I1027 03:03:14.917911   13053 debugging.go:99] GET https://ose3-master.example.com:8443/oapi
I1027 03:03:14.917986   13053 debugging.go:106] Request Headers:
I1027 03:03:14.917991   13053 debugging.go:109]     User-Agent: oc/v3.0.2.903 (linux/amd64) openshift/49953d6
I1027 03:03:14.981781   13053 debugging.go:124] Response Status: 200 OK in 63 milliseconds
I1027 03:03:14.981818   13053 debugging.go:127] Response Headers:
I1027 03:03:14.981826   13053 debugging.go:130]     Date: Tue, 27 Oct 2015 07:03:14 GMT
I1027 03:03:14.981833   13053 debugging.go:130]     Content-Length: 32
I1027 03:03:14.981840   13053 debugging.go:130]     Cache-Control: no-store
I1027 03:03:14.981846   13053 debugging.go:130]     Content-Type: application/json
I1027 03:03:14.981892   13053 request.go:777] Response Body: {
  "versions": [
    "v1"
  ]
}
I1027 03:03:14.985450   13053 debugging.go:99] GET https://ose3-master.example.com:8443/api
I1027 03:03:14.985465   13053 debugging.go:106] Request Headers:
I1027 03:03:14.985469   13053 debugging.go:109]     User-Agent: oc/v1.2.0 (linux/amd64) kubernetes/4c8e6f4
I1027 03:03:14.990625   13053 debugging.go:124] Response Status: 200 OK in 5 milliseconds
I1027 03:03:14.990660   13053 debugging.go:127] Response Headers:
I1027 03:03:14.990669   13053 debugging.go:130]     Cache-Control: no-store
I1027 03:03:14.990677   13053 debugging.go:130]     Content-Type: application/json
I1027 03:03:14.990685   13053 debugging.go:130]     Date: Tue, 27 Oct 2015 07:03:14 GMT
I1027 03:03:14.990696   13053 debugging.go:130]     Content-Length: 32
I1027 03:03:14.990724   13053 request.go:777] Response Body: {
  "versions": [
    "v1"
  ]
}
I1027 03:03:14.990924   13053 debugging.go:99] GET https://ose3-master.example.com:8443/oapi
I1027 03:03:14.990931   13053 debugging.go:106] Request Headers:
I1027 03:03:14.990935   13053 debugging.go:109]     User-Agent: oc/v3.0.2.903 (linux/amd64) openshift/49953d6
I1027 03:03:14.993647   13053 debugging.go:124] Response Status: 200 OK in 2 milliseconds
I1027 03:03:14.993675   13053 debugging.go:127] Response Headers:
I1027 03:03:14.993683   13053 debugging.go:130]     Cache-Control: no-store
I1027 03:03:14.993690   13053 debugging.go:130]     Content-Type: application/json
I1027 03:03:14.993696   13053 debugging.go:130]     Date: Tue, 27 Oct 2015 07:03:14 GMT
I1027 03:03:14.993700   13053 debugging.go:130]     Content-Length: 32
I1027 03:03:14.993718   13053 request.go:777] Response Body: {
  "versions": [
    "v1"
  ]
}
I1027 03:03:14.993917   13053 debugging.go:99] GET https://ose3-master.example.com:8443/oapi/v1/namespaces/default/templates/default-project-request
I1027 03:03:14.993926   13053 debugging.go:106] Request Headers:
I1027 03:03:14.993930   13053 debugging.go:109]     User-Agent: oc/v3.0.2.903 (linux/amd64) openshift/49953d6
I1027 03:03:14.997685   13053 debugging.go:124] Response Status: 200 OK in 3 milliseconds
I1027 03:03:14.997711   13053 debugging.go:127] Response Headers:
I1027 03:03:14.997719   13053 debugging.go:130]     Cache-Control: no-store
I1027 03:03:14.997726   13053 debugging.go:130]     Content-Type: application/json
I1027 03:03:14.997732   13053 debugging.go:130]     Date: Tue, 27 Oct 2015 07:03:14 GMT
I1027 03:03:14.997761   13053 request.go:777] Response Body: {"kind":"Template","apiVersion":"v1","metadata":{"name":"default-project-request","namespace":"default","selfLink":"/oapi/v1/namespaces/default/templates/default-project-request","uid":"6ef028d6-7c78-11e5-9b45-525400b33d1d","resourceVersion":"540","creationTimestamp":"2015-10-27T07:00:40Z"},"objects":[{"apiVersion":"v1","kind":"Project","metadata":{"annotations":{"openshift.io/description":"${PROJECT_DESCRIPTION}","openshift.io/display-name":"${PROJECT_DISPLAYNAME}"},"creationTimestamp":null,"name":"${PROJECT_NAME}"},"spec":{},"status":{}},{"apiVersion":"v1","kind":"ResourceQuota","metadata":{"name":"${PROJECT_NAME}-quota"},"spec":{"hard":{"cpu":"200m","memory":"512Mi","pods":3,"replicationcontrollers":3,"resourcequotas":1,"services":3}}},{"apiVersion":"v1","kind":"LimitRange","metadata":{"creationTimestamp":null,"name":"${PROJECT_NAME}-limits"},"spec":{"limits":[{"max":{"cpu":"500m","memory":"750Mi"},"min":{"cpu":"10m","memory":"5Mi"},"type":"Pod"},{"default":{"cpu":"100m","memory":"100Mi"},"max":{"cpu":"500m","memory":"750Mi"},"min":{"cpu":"10m","memory":"5Mi"},"type":"Container"}]}},{"apiVersion":"v1","groupNames":[],"kind":"RoleBinding","metadata":{"creationTimestamp":null,"name":"admins","namespace":"${PROJECT_NAME}"},"roleRef":{"name":"admin"},"subjects":[{"kind":"User","name":"${PROJECT_ADMIN_USER}"}],"userNames":["${PROJECT_ADMIN_USER}"]},{"apiVersion":"v1","groupNames":["system:serviceaccounts:${PROJECT_NAME}"],"kind":"RoleBinding","metadata":{"creationTimestamp":null,"name":"system:image-pullers","namespace":"${PROJECT_NAME}"},"roleRef":{"name":"system:image-puller"},"subjects":[{"kind":"SystemGroup","name":"system:serviceaccounts:${PROJECT_NAME}"}],"userNames":[]},{"apiVersion":"v1","groupNames":[],"kind":"RoleBinding","metadata":{"creationTimestamp":null,"name":"system:image-builders","namespace":"${PROJECT_NAME}"},"roleRef":{"name":"system:image-builder"},"subjects":[{"kind":"ServiceAccount","name":"builder"}],"userNames":["system:serviceaccount:${PROJECT_NAME}:builder"]},{"apiVersion":"v1","groupNames":[],"kind":"RoleBinding","metadata":{"creationTimestamp":null,"name":"system:deployers","namespace":"${PROJECT_NAME}"},"roleRef":{"name":"system:deployer"},"subjects":[{"kind":"ServiceAccount","name":"deployer"}],"userNames":["system:serviceaccount:${PROJECT_NAME}:deployer"]}],"parameters":[{"name":"PROJECT_NAME"},{"name":"PROJECT_DISPLAYNAME"},{"name":"PROJECT_DESCRIPTION"},{"name":"PROJECT_ADMIN_USER"}]}
{
    "kind": "Template",
    "apiVersion": "v1",
    "metadata": {
        "name": "default-project-request",
        "namespace": "default",
        "selfLink": "/oapi/v1/namespaces/default/templates/default-project-request",
        "uid": "6ef028d6-7c78-11e5-9b45-525400b33d1d",
        "resourceVersion": "540",
        "creationTimestamp": "2015-10-27T07:00:40Z"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Project",
            "metadata": {
                "annotations": {
                    "openshift.io/description": "${PROJECT_DESCRIPTION}",
                    "openshift.io/display-name": "${PROJECT_DISPLAYNAME}"
                },
                "creationTimestamp": null,
                "name": "${PROJECT_NAME}"
            },
            "spec": {},
            "status": {}
        },
        {
            "apiVersion": "v1",
            "kind": "ResourceQuota",
            "metadata": {
                "name": "${PROJECT_NAME}-quota"
            },
            "spec": {
                "hard": {
                    "cpu": "200m",
                    "memory": "512Mi",
                    "pods": 3,
                    "replicationcontrollers": 3,
                    "resourcequotas": 1,
                    "services": 3
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "LimitRange",
            "metadata": {
                "creationTimestamp": null,
                "name": "${PROJECT_NAME}-limits"
            },
            "spec": {
                "limits": [
                    {
                        "max": {
                            "cpu": "500m",
                            "memory": "750Mi"
                        },
                        "min": {
                            "cpu": "10m",
                            "memory": "5Mi"
                        },
                        "type": "Pod"
                    },
                    {
                        "default": {
                            "cpu": "100m",
                            "memory": "100Mi"
                        },
                        "max": {
                            "cpu": "500m",
                            "memory": "750Mi"
                        },
                        "min": {
                            "cpu": "10m",
                            "memory": "5Mi"
                        },
                        "type": "Container"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "groupNames": [],
            "kind": "RoleBinding",
            "metadata": {
                "creationTimestamp": null,
                "name": "admins",
                "namespace": "${PROJECT_NAME}"
            },
            "roleRef": {
                "name": "admin"
            },
            "subjects": [
                {
                    "kind": "User",
                    "name": "${PROJECT_ADMIN_USER}"
                }
            ],
            "userNames": [
                "${PROJECT_ADMIN_USER}"
            ]
        },
        {
            "apiVersion": "v1",
            "groupNames": [
                "system:serviceaccounts:${PROJECT_NAME}"
            ],
            "kind": "RoleBinding",
            "metadata": {
                "creationTimestamp": null,
                "name": "system:image-pullers",
                "namespace": "${PROJECT_NAME}"
            },
            "roleRef": {
                "name": "system:image-puller"
            },
            "subjects": [
                {
                    "kind": "SystemGroup",
                    "name": "system:serviceaccounts:${PROJECT_NAME}"
                }
            ],
            "userNames": []
        },
        {
            "apiVersion": "v1",
            "groupNames": [],
            "kind": "RoleBinding",
            "metadata": {
                "creationTimestamp": null,
                "name": "system:image-builders",
                "namespace": "${PROJECT_NAME}"
            },
            "roleRef": {
                "name": "system:image-builder"
            },
            "subjects": [
                {
                    "kind": "ServiceAccount",
                    "name": "builder"
                }
            ],
            "userNames": [
                "system:serviceaccount:${PROJECT_NAME}:builder"
            ]
        },
        {
            "apiVersion": "v1",
            "groupNames": [],
            "kind": "RoleBinding",
            "metadata": {
                "creationTimestamp": null,
                "name": "system:deployers",
                "namespace": "${PROJECT_NAME}"
            },
            "roleRef": {
                "name": "system:deployer"
            },
            "subjects": [
                {
                    "kind": "ServiceAccount",
                    "name": "deployer"
                }
            ],
            "userNames": [
                "system:serviceaccount:${PROJECT_NAME}:deployer"
            ]
        }
    ],
    "parameters": [
        {
            "name": "PROJECT_NAME"
        },
        {
            "name": "PROJECT_DISPLAYNAME"
        },
        {
            "name": "PROJECT_DESCRIPTION"
        },
        {
            "name": "PROJECT_ADMIN_USER"
        }
    ]
}

Comment 4 Jordan Liggitt 2015-10-28 12:15:27 UTC
Looks like a few things are going on:

1. The kube API versions are being incorrectly reversed in pkg/api/install/install.go#init(), so v1beta3 is being preferred over v1

2. The kube client isn't doing any sort of negotiation or api version selection based on what is enabled for the server

Comment 5 David Eads 2015-10-28 17:35:01 UTC
See https://github.com/openshift/origin/pull/5454

Also, the test has been updated to ensure this doesn't slip again.

Comment 7 Jianwei Hou 2015-11-09 11:37:01 UTC
Verified on 
openshift v3.1.0.2
kubernetes v1.1.0-origin-1107-g4c8e6f4
etcd 2.1.2

Steps:
1. Create a template file with LimitRange and ResourceQuota for the project
2. Create the template under the default project
3. Edit the /etc/origin/master/master-config.yaml, add the template to key projectRequestTemplate
4. Restart master
5. oc new-project demo --display-name='OpenShift 3 Demo' --description='This is the first demo project with OpenShift v3' --loglevel=8
6. oc describe project demo

Results:
After step 5:
I1109 19:33:23.341338   44319 debugging.go:99] GET https://openshift-140.lab.eng.nay.redhat.com:8443/api
I1109 19:33:23.341478   44319 debugging.go:106] Request Headers:
I1109 19:33:23.341488   44319 debugging.go:109]     User-Agent: oc/v1.1.0 (linux/amd64) kubernetes/4c8e6f4
I1109 19:33:23.382671   44319 debugging.go:124] Response Status: 200 OK in 41 milliseconds
I1109 19:33:23.382707   44319 debugging.go:127] Response Headers:
I1109 19:33:23.382716   44319 debugging.go:130]     Date: Mon, 09 Nov 2015 11:33:23 GMT
I1109 19:33:23.382724   44319 debugging.go:130]     Content-Length: 32
I1109 19:33:23.382731   44319 debugging.go:130]     Cache-Control: no-store
I1109 19:33:23.382738   44319 debugging.go:130]     Content-Type: application/json
I1109 19:33:23.382785   44319 request.go:796] Response Body: {
  "versions": [
    "v1"
  ]
}
I1109 19:33:23.387694   44319 debugging.go:99] GET https://openshift-140.lab.eng.nay.redhat.com:8443/oapi
I1109 19:33:23.387709   44319 debugging.go:106] Request Headers:
I1109 19:33:23.387716   44319 debugging.go:109]     User-Agent: oc/v3.1.0.2 (linux/amd64) openshift/7518115
I1109 19:33:23.389022   44319 debugging.go:124] Response Status: 200 OK in 1 milliseconds
I1109 19:33:23.389069   44319 debugging.go:127] Response Headers:
I1109 19:33:23.389080   44319 debugging.go:130]     Cache-Control: no-store
I1109 19:33:23.389088   44319 debugging.go:130]     Content-Type: application/json
I1109 19:33:23.389096   44319 debugging.go:130]     Date: Mon, 09 Nov 2015 11:33:23 GMT
I1109 19:33:23.389103   44319 debugging.go:130]     Content-Length: 32
I1109 19:33:23.389134   44319 request.go:796] Response Body: {
  "versions": [
    "v1"
  ]
}
I1109 19:33:23.392094   44319 debugging.go:99] GET https://openshift-140.lab.eng.nay.redhat.com:8443/oapi/v1/projectrequests
I1109 19:33:23.392113   44319 debugging.go:106] Request Headers:
I1109 19:33:23.392120   44319 debugging.go:109]     User-Agent: oc/v3.1.0.2 (linux/amd64) openshift/7518115
I1109 19:33:23.397457   44319 debugging.go:124] Response Status: 200 OK in 5 milliseconds
I1109 19:33:23.397501   44319 debugging.go:127] Response Headers:
I1109 19:33:23.397510   44319 debugging.go:130]     Cache-Control: no-store
I1109 19:33:23.397517   44319 debugging.go:130]     Content-Type: application/json
I1109 19:33:23.397524   44319 debugging.go:130]     Date: Mon, 09 Nov 2015 11:33:23 GMT
I1109 19:33:23.397531   44319 debugging.go:130]     Content-Length: 69
I1109 19:33:23.397549   44319 request.go:796] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success"}
I1109 19:33:23.397965   44319 request.go:543] Request Body: {"kind":"ProjectRequest","apiVersion":"v1","metadata":{"name":"demo","creationTimestamp":null},"displayName":"OpenShift 3 Demo","description":"This is the first demo project with OpenShift v3"}
I1109 19:33:23.397997   44319 debugging.go:99] POST https://openshift-140.lab.eng.nay.redhat.com:8443/oapi/v1/projectrequests
I1109 19:33:23.398006   44319 debugging.go:106] Request Headers:
I1109 19:33:23.398013   44319 debugging.go:109]     User-Agent: oc/v3.1.0.2 (linux/amd64) openshift/7518115
I1109 19:33:24.050944   44319 debugging.go:124] Response Status: 201 Created in 652 milliseconds
I1109 19:33:24.050989   44319 debugging.go:127] Response Headers:
I1109 19:33:24.050999   44319 debugging.go:130]     Content-Type: application/json
I1109 19:33:24.051007   44319 debugging.go:130]     Date: Mon, 09 Nov 2015 11:33:24 GMT
I1109 19:33:24.051014   44319 debugging.go:130]     Content-Length: 598
I1109 19:33:24.051022   44319 debugging.go:130]     Cache-Control: no-store
I1109 19:33:24.051072   44319 request.go:796] Response Body: {"kind":"Project","apiVersion":"v1","metadata":{"name":"demo","selfLink":"/oapi/v1/projectrequests/demo","uid":"af6f9444-86d5-11e5-a23a-fa163e6962d3","resourceVersion":"12623","creationTimestamp":"2015-11-09T11:33:23Z","annotations":{"openshift.io/description":"This is the first demo project with OpenShift v3","openshift.io/display-name":"OpenShift 3 Demo","openshift.io/sa.scc.mcs":"s0:c7,c4","openshift.io/sa.scc.supplemental-groups":"1000050000/10000","openshift.io/sa.scc.uid-range":"1000050000/10000"}},"spec":{"finalizers":["openshift.io/origin","kubernetes"]},"status":{"phase":"Active"}}
I1109 19:33:24.051779   44319 debugging.go:99] GET https://openshift-140.lab.eng.nay.redhat.com:8443/oapi/v1/users/~
I1109 19:33:24.051797   44319 debugging.go:106] Request Headers:
I1109 19:33:24.051804   44319 debugging.go:109]     User-Agent: oc/v3.1.0.2 (linux/amd64) openshift/7518115
I1109 19:33:24.053210   44319 debugging.go:124] Response Status: 200 OK in 1 milliseconds
I1109 19:33:24.053226   44319 debugging.go:127] Response Headers:
I1109 19:33:24.053234   44319 debugging.go:130]     Cache-Control: no-store
I1109 19:33:24.053241   44319 debugging.go:130]     Content-Type: application/json
I1109 19:33:24.053250   44319 debugging.go:130]     Date: Mon, 09 Nov 2015 11:33:24 GMT
I1109 19:33:24.053257   44319 debugging.go:130]     Content-Length: 188
I1109 19:33:24.053275   44319 request.go:796] Response Body: {"kind":"User","apiVersion":"v1","metadata":{"name":"system:admin","selfLink":"/oapi/v1/users/system:admin","creationTimestamp":null},"identities":null,"groups":["system:cluster-admins"]}
I1109 19:33:24.053660   44319 debugging.go:99] GET https://openshift-140.lab.eng.nay.redhat.com:8443/oapi/v1/users/~
I1109 19:33:24.053674   44319 debugging.go:106] Request Headers:
I1109 19:33:24.053681   44319 debugging.go:109]     User-Agent: oc/v3.1.0.2 (linux/amd64) openshift/7518115
I1109 19:33:24.054922   44319 debugging.go:124] Response Status: 200 OK in 1 milliseconds
I1109 19:33:24.054938   44319 debugging.go:127] Response Headers:
I1109 19:33:24.054945   44319 debugging.go:130]     Cache-Control: no-store
I1109 19:33:24.054953   44319 debugging.go:130]     Content-Type: application/json
I1109 19:33:24.054960   44319 debugging.go:130]     Date: Mon, 09 Nov 2015 11:33:24 GMT
I1109 19:33:24.054967   44319 debugging.go:130]     Content-Length: 188
I1109 19:33:24.054982   44319 request.go:796] Response Body: {"kind":"User","apiVersion":"v1","metadata":{"name":"system:admin","selfLink":"/oapi/v1/users/system:admin","creationTimestamp":null},"identities":null,"groups":["system:cluster-admins"]}
Now using project "demo" on server "https://openshift-140.lab.eng.nay.redhat.com:8443".


After step 6:
Name:		demo
Created:	7 seconds ago
Labels:		<none>
Annotations:	openshift.io/description=This is the first demo project with OpenShift v3
		openshift.io/display-name=OpenShift 3 Demo
		openshift.io/sa.scc.mcs=s0:c7,c4
		openshift.io/sa.scc.supplemental-groups=1000050000/10000
		openshift.io/sa.scc.uid-range=1000050000/10000
Display Name:	OpenShift 3 Demo
Description:	This is the first demo project with OpenShift v3
Status:		Active
Node Selector:	<none>
Quota:
	Name:			quota
	Resource		Used	Hard
	--------		----	----
	cpu			0	20
	memory			0	1Gi
	persistentvolumeclaims	0	10
	pods			0	10
	replicationcontrollers	0	20
	resourcequotas		1	1
	secrets			9	10
	services		0	5
Resource limits:
	Name:		limits
	Type		Resource	Min	Max	Default
	----		--------	---	---	---
	Container	memory		-	-	512Mi
	Container	cpu		-	-	200m


Project created successfully with quota/limit range