Bug 1524883 - [pod_public_799] Wrong message when request hugepage greater than limit hugepage
Summary: [pod_public_799] Wrong message when request hugepage greater than limit hugepage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.9.0
Assignee: Derek Carr
QA Contact: DeShuai Ma
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-12 09:30 UTC by weiwei jiang
Modified: 2018-03-28 14:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-28 14:15:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 0 None None None 2018-03-28 14:15:53 UTC

Description weiwei jiang 2017-12-12 09:30:20 UTC
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:

Comment 1 Derek Carr 2017-12-12 16:26:55 UTC
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.

Comment 2 weiwei jiang 2018-01-03 07:07:03 UTC
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

Comment 4 weiwei jiang 2018-01-23 03:31:13 UTC
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

Comment 7 errata-xmlrpc 2018-03-28 14:15:24 UTC
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


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