Description of problem: After setup with hugepage, got "must be equal to alpha.kubernetes.io/nvidia-gpu limit" when create pod with request hugepage greater than limit. Version-Release number of selected component (if applicable): # openshift version openshift v3.8.18 kubernetes v1.8.1+0d5291c etcd 3.2.8 How reproducible: Always Steps to Reproduce: 1. Setup openshift with hugepage feature gate. /etc/origin/master/master-config.yaml kubernetesMasterConfig: apiServerArguments: ...... feature-gates: - HugePages=true controllerArguments: ...... feature-gates: - HugePages=true /etc/origin/node/node-config.yaml kubeletArguments: ...... feature-gates: - HugePages=true 2. Create pod with request hugepage greater than limit hugepage # cat <<EOF | oc create -f - apiVersion: v1 kind: Pod metadata: name: example spec: securityContext: supplementalGroups: - 0 containers: - image: bmeng/hello-openshift:latest name: hello volumeMounts: - mountPath: /hugepages name: hugepage resources: requests: hugepages-2Mi: 2Gi limits: hugepages-2Mi: 1Gi volumes: - name: hugepage emptyDir: medium: HugePages EOF Actual results: 2. The Pod "example" is invalid: spec.containers[0].resources.requests: Invalid value: "2Gi": must be equal to alpha.kubernetes.io/nvidia-gpu limit Expected results: 2. Should not got nvidia-gpu message. Additional info:
Tested same example against kube 1.9. $ kubectl create -f bug.yaml The Pod "example" is invalid: spec.containers[0].resources.requests: Invalid value: "2Gi": must be equal to hugepages-2Mi limit The error message appears resolved in latest release, so this should be fixed when rebase of 1.9 lands.
Checked with v3.9.0 and this issue has been fixed, but the version of kubernetes display v1.8.1. # oc version oc v3.9.0-0.9.0 kubernetes v1.8.1+0d5291c features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://172.16.120.104:8443 openshift v3.9.0-0.9.0 kubernetes v1.8.1+0d5291c # cat <<EOF | oc create -f - > apiVersion: v1 > kind: Pod > metadata: > name: example > spec: > securityContext: > supplementalGroups: > - 0 > containers: > - image: bmeng/hello-openshift:latest > name: hello > volumeMounts: > - mountPath: /hugepages > name: hugepage > resources: > requests: > hugepages-2Mi: 2Gi > limits: > hugepages-2Mi: 1Gi > volumes: > - name: hugepage > emptyDir: > medium: HugePages > EOF The Pod "example" is invalid: spec.containers[0].resources.requests: Invalid value: "2Gi": must be equal to hugepages-2Mi limit
Checked again with v3.9.0-0.22.0 and the issue has been fixed. # cat <<EOF | oc create -f - > apiVersion: v1 > kind: Pod > metadata: > name: example > spec: > securityContext: > supplementalGroups: > - 0 > containers: > - image: bmeng/hello-openshift:latest > name: hello > volumeMounts: > - mountPath: /hugepages > name: hugepage > resources: > requests: > hugepages-2Mi: 2Gi > limits: > hugepages-2Mi: 1Gi > volumes: > - name: hugepage > emptyDir: > medium: HugePages > EOF The Pod "example" is invalid: spec.containers[0].resources.requests: Invalid value: "2Gi": must be equal to hugepages-2Mi limit [root@host-172-16-120-132 ~]# openshift version openshift v3.9.0-0.22.0 kubernetes v1.9.1+a0ce1bc657 etcd 3.2.8
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0489